#include "ui_local.h"
Include dependency graph for ui_sparena.c:

Go to the source code of this file.
Functions | |
| void | UI_SPArena_Start (const char *arenaInfo) |
|
|
Definition at line 25 of file ui_sparena.c. References atoi, EXEC_APPEND, Info_ValueForKey(), level, n, Q_stricmp(), trap_Cmd_ExecuteText(), trap_Cvar_SetValue(), trap_Cvar_VariableValue(), UI_GetNumSPTiers(), and va(). Referenced by UI_SPPostgameMenu_NextEvent(), and UI_SPSkillMenu_FightEvent(). 00025 {
00026 char *map;
00027 int level;
00028 int n;
00029 char *txt;
00030
00031 n = (int)trap_Cvar_VariableValue( "sv_maxclients" );
00032 if ( n < 8 ) {
00033 trap_Cvar_SetValue( "sv_maxclients", 8 );
00034 }
00035
00036 level = atoi( Info_ValueForKey( arenaInfo, "num" ) );
00037 txt = Info_ValueForKey( arenaInfo, "special" );
00038 if( txt[0] ) {
00039 if( Q_stricmp( txt, "training" ) == 0 ) {
00040 level = -4;
00041 }
00042 else if( Q_stricmp( txt, "final" ) == 0 ) {
00043 level = UI_GetNumSPTiers() * ARENAS_PER_TIER;
00044 }
00045 }
00046 trap_Cvar_SetValue( "ui_spSelection", level );
00047
00048 map = Info_ValueForKey( arenaInfo, "map" );
00049 trap_Cmd_ExecuteText( EXEC_APPEND, va( "spmap %s\n", map ) );
00050 }
|
Here is the call graph for this function:

1.3.9.1