/* =============== G_InitMapRotations Load and initialise the map rotations =============== */ void G_InitMapRotations( void ) { const char *fileName = "maprotation.cfg"; // Load the file if it exists if ( trap_FS_FOpenFile( fileName, NULL, FS_READ ) ) { if ( !G_ParseMapRotationFile( fileName ) ) { G_Printf( S_COLOR_RED "ERROR: failed to parse %s file\n", fileName ); } } else { G_Printf( "%s file not found.\n", fileName ); } if ( g_currentMapRotation.integer == NOT_ROTATING ) { if ( g_initialMapRotation.string[ 0 ] != 0 ) { G_StartMapRotation( g_initialMapRotation.string, qfalse, qtrue, qfalse, 0 ); trap_Cvar_Set( "g_initialMapRotation", "" ); trap_Cvar_Update( &g_initialMapRotation ); } } }
/* =============== G_InitMapRotations Load and intialise the map rotations =============== */ void G_InitMapRotations( void ) { const char *fileName = "maprotation.cfg"; fileHandle_t f; //load the file if it exists if( trap_FS_FOpenFile( fileName, &f, FS_READ ) > 0 ) { trap_FS_FCloseFile( f ); if( !G_ParseMapRotationFile( fileName ) ) G_Printf( S_COLOR_RED "ERROR: failed to parse %s file\n", fileName ); } else G_Printf( "%s file not found.\n", fileName ); if( g_currentMapRotation.integer == NOT_ROTATING ) { if( g_initialMapRotation.string[ 0 ] != 0 ) { G_StartMapRotation( g_initialMapRotation.string, false ); trap_Cvar_Set( "g_initialMapRotation", "" ); trap_Cvar_Update( &g_initialMapRotation ); } } }