From 385357e2b4c1940e1892d64daee61150f85a4961 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 23 Jul 2005 00:30:28 +0000 Subject: * Added some code to complain if com_hunkMegs is set too low * Added some logging to track a targetting bug --- src/ui/ui_main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ui') diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 09bb0e3d..200b8b8a 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -5823,6 +5823,18 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) { trap_Cvar_Set("com_errorMessage", ""); } } + +#define MIN_HUNKMEGS 100 + + trap_Cvar_VariableStringBuffer( "com_hunkMegs", buf, sizeof( buf ) ); + if( strlen( buf ) && atoi( buf ) < MIN_HUNKMEGS ) + { + trap_Cvar_Set( "com_hunkMegs", va( "%d", MIN_HUNKMEGS ) ); + trap_Cvar_Set( "com_errorMessage", "Your com_hunkMegs setting was too low. " + "It has been changed to a suitable value, but you must restart Quake 3 " + "for it to take effect." ); + Menus_ActivateByName( "error_popmenu" ); + } return; case UIMENU_TEAM: trap_Key_SetCatcher( KEYCATCH_UI ); -- cgit