/* * G_MapRotationNormal */ static const char *G_MapRotationNormal( void ) { G_UpdateMapRotation(); if( !map_rotation_count ) return NULL; if( map_rotation_current >= map_rotation_count || map_rotation_p[map_rotation_current] == NULL ) map_rotation_current = 0; return map_rotation_p[map_rotation_current++]; }
/* * G_MapRotationNormal */ static const char *G_MapRotationRandom( void ) { int seed, selection; G_UpdateMapRotation(); // avoid eternal loop if( !map_rotation_count || map_rotation_count == 1 ) return NULL; seed = game.realtime; do { selection = (int)Q_brandom( &seed, 0, map_rotation_count ); } while( selection == map_rotation_current ); map_rotation_current = selection; return map_rotation_p[map_rotation_current]; }