(#4918) Gametype clamping using constant integer in missionpack ui, by Zack Middleton

This commit is contained in:
Thilo Schulz 2011-03-04 20:23:29 +00:00
parent b1f861b8da
commit 8bdd8e6705
1 changed files with 2 additions and 2 deletions

View File

@ -2776,7 +2776,7 @@ static void UI_StartSinglePlayer(void) {
}
trap_Cvar_SetValue( "singleplayer", 1 );
trap_Cvar_SetValue( "g_gametype", Com_Clamp( 0, 7, tierList[i].gameTypes[j] ) );
trap_Cvar_SetValue( "g_gametype", Com_Clamp( 0, GT_MAX_GAME_TYPE-1, tierList[i].gameTypes[j] ) );
trap_Cmd_ExecuteText( EXEC_APPEND, va( "wait ; wait ; map %s\n", tierList[i].maps[j] ) );
skill = trap_Cvar_VariableValue( "g_spSkill" );
@ -3160,7 +3160,7 @@ static void UI_RunMenuScript(char **args) {
trap_Cvar_Set("cg_cameraOrbit", "0");
trap_Cvar_Set("ui_singlePlayerActive", "0");
trap_Cvar_SetValue( "dedicated", Com_Clamp( 0, 2, ui_dedicated.integer ) );
trap_Cvar_SetValue( "g_gametype", Com_Clamp( 0, 8, uiInfo.gameTypes[ui_netGameType.integer].gtEnum ) );
trap_Cvar_SetValue( "g_gametype", Com_Clamp( 0, GT_MAX_GAME_TYPE-1, uiInfo.gameTypes[ui_netGameType.integer].gtEnum ) );
trap_Cvar_Set("g_redTeam", UI_Cvar_VariableString("ui_teamName"));
trap_Cvar_Set("g_blueTeam", UI_Cvar_VariableString("ui_opponentName"));
trap_Cmd_ExecuteText( EXEC_APPEND, va( "wait ; wait ; map %s\n", uiInfo.mapList[ui_currentNetMap.integer].mapLoadName ) );