From d563deba76d722a9a7723f446c78232a28d57728 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Fri, 4 Feb 2011 14:44:17 +0000 Subject: [PATCH] Fix https://bugzilla.icculus.org/show_bug.cgi?id=4733 --- code/game/bg_public.h | 4 ++-- code/q3_ui/ui_startserver.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/bg_public.h b/code/game/bg_public.h index 6376b5c0..ad5ab39e 100644 --- a/code/game/bg_public.h +++ b/code/game/bg_public.h @@ -103,10 +103,10 @@ typedef enum { GT_TEAM, // team deathmatch GT_CTF, // capture the flag - GT_MAX_GAME_TYPE, // other gametypes haven't been implemented. GT_1FCTF, GT_OBELISK, - GT_HARVESTER + GT_HARVESTER, + GT_MAX_GAME_TYPE } gametype_t; typedef enum { GENDER_MALE, GENDER_FEMALE, GENDER_NEUTER } gender_t; diff --git a/code/q3_ui/ui_startserver.c b/code/q3_ui/ui_startserver.c index 39b2c7f5..4230dc33 100644 --- a/code/q3_ui/ui_startserver.c +++ b/code/q3_ui/ui_startserver.c @@ -1239,7 +1239,8 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) { memset( &s_serveroptions, 0 ,sizeof(serveroptions_t) ); s_serveroptions.multiplayer = multiplayer; - s_serveroptions.gametype = (int)Com_Clamp( 0, GT_MAX_GAME_TYPE - 1, trap_Cvar_VariableValue( "g_gameType" ) ); + s_serveroptions.gametype = (int) Com_Clamp(0, ARRAY_LEN(gametype_remap2) - 1, + trap_Cvar_VariableValue("g_gametype")); s_serveroptions.punkbuster.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "sv_punkbuster" ) ); ServerOptions_Cache();