/* =============== G_PopRotationStack Pop the rotation stack =============== */ static int G_PopRotationStack( void ) { int value = -1; char text[ MAX_CVAR_VALUE_STRING ]; char *text_p, *token; Q_strncpyz( text, g_mapRotationStack.string, sizeof( text ) ); text_p = text; token = COM_Parse( &text_p ); if ( *token ) { value = atoi( token ); } if ( text_p ) { while ( *text_p == ' ' ) { text_p++; } trap_Cvar_Set( "g_mapRotationStack", text_p ); trap_Cvar_Update( &g_mapRotationStack ); } else { G_ClearRotationStack(); } return value; }
static void Svcmd_MapRotation_f( void ) { char rotationName[ MAX_QPATH ]; if( trap_Argc( ) != 2 ) { G_Printf( "usage: maprotation <name>\n" ); return; } G_ClearRotationStack( ); trap_Argv( 1, rotationName, sizeof( rotationName ) ); if( !G_StartMapRotation( rotationName, qfalse, qtrue, qfalse, 0 ) ) G_Printf( "maprotation: invalid map rotation \"%s\"\n", rotationName ); }
static void Svcmd_MapRotation_f() { char rotationName[ MAX_QPATH ]; if ( trap_Argc() != 2 ) { Log::Notice( "usage: maprotation <name>" ); return; } G_ClearRotationStack(); trap_Argv( 1, rotationName, sizeof( rotationName ) ); if ( !G_StartMapRotation( rotationName, false, true, false, 0 ) ) { Log::Notice( "maprotation: invalid map rotation \"%s\"", rotationName ); } }