Not really what one should do in this case.
If a mapcfg wants to change a setting that is meant to be able to stay usually (like Minstagib), it should do it like this:
mapname.mapcfg wrote:set _backup_g_minstagib $g_minstagib
exit_cfg "mapname_exit.cfg"
g_minstagib 1
changelevel mapname
mapname_exit.cfg wrote:g_minstagib $_backup_g_minstagib
Because quite some maps do it wrong (especially the ones by 70mm13), I made the RBI server go a different route and let it rewrite the mapcfgs to strip out evil settings or make them harmless. This is my current report on maps that change settings it shouldn't:
maplist.sh wrote:WARNING: dm_70mm13_01 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_01 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_01 changes sv_gravity to 800
WARNING: dm_70mm13_01 changes sv_friction to 5
WARNING: dm_70mm13_01 changes sv_maxspeed to 400
WARNING: dm_70mm13_01 changes sv_accelerate to 5.5
WARNING: dm_70mm13_03 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_03 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_03 changes sv_gravity to 800
WARNING: dm_70mm13_03 changes sv_friction to 5
WARNING: dm_70mm13_03 changes sv_maxspeed to 400
WARNING: dm_70mm13_03 changes sv_accelerate to 5.5
WARNING: dm_70mm13_03 changes playerlimit to 9
WARNING: dm_70mm13_04 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_04 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_04 changes sv_gravity to 800
WARNING: dm_70mm13_04 changes sv_friction to 5
WARNING: dm_70mm13_04 changes sv_maxspeed to 400
WARNING: dm_70mm13_04 changes sv_accelerate to 5.5
WARNING: dm_70mm13_05 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_05 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_05 changes sv_gravity to 800
WARNING: dm_70mm13_05 changes sv_friction to 5
WARNING: dm_70mm13_05 changes sv_maxspeed to 400
WARNING: dm_70mm13_05 changes sv_accelerate to 5.5
WARNING: dm_70mm13_06 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_06 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_06 changes sv_gravity to 600
WARNING: dm_70mm13_06 changes sv_friction to 7
WARNING: dm_70mm13_06 changes sv_maxspeed to 500
WARNING: dm_70mm13_06 changes sv_accelerate to 7
WARNING: dm_70mm13_07 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_07 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_07 changes sv_gravity to 800
WARNING: dm_70mm13_07 changes sv_friction to 5
WARNING: dm_70mm13_07 changes sv_maxspeed to 400
WARNING: dm_70mm13_07 changes sv_accelerate to 5.5
WARNING: dm_70mm13_08 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_08 changes g_start_weapon_laser to 0
WARNING: dm_70mm13_08 changes sv_gravity to 800
WARNING: dm_70mm13_08 changes sv_friction to 5
WARNING: dm_70mm13_08 changes sv_maxspeed to 400
WARNING: dm_70mm13_08 changes sv_accelerate to 5.5
WARNING: dm_70mm13_10 changes g_balance_armor_limit to 150
WARNING: dm_70mm13_10 changes g_balance_armor_regen to 0
WARNING: dm_70mm13_10 changes g_balance_health_limit to 150
WARNING: dm_70mm13_10 changes g_balance_health_regen to 0
WARNING: dm_70mm13_10 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_10 changes g_start_weapon_shotgun to 1
WARNING: dm_70mm13_10 changes sv_gravity to 800
WARNING: dm_70mm13_10 changes sv_friction to 5
WARNING: dm_70mm13_10 changes sv_maxspeed to 400
WARNING: dm_70mm13_10 changes sv_accelerate to 5.5
WARNING: dm_70mm13_10 changes playerlimit to 9
WARNING: ctf_70mm13_10ctf changes g_balance_armor_limit to 150
WARNING: ctf_70mm13_10ctf changes g_balance_armor_regen to 0
WARNING: ctf_70mm13_10ctf changes g_balance_health_limit to 150
WARNING: ctf_70mm13_10ctf changes g_balance_health_regen to 0
WARNING: ctf_70mm13_10ctf changes g_start_weapon_laser to 1
WARNING: ctf_70mm13_10ctf changes g_start_weapon_shotgun to 1
WARNING: ctf_70mm13_10ctf changes sv_gravity to 800
WARNING: ctf_70mm13_10ctf changes sv_friction to 5
WARNING: ctf_70mm13_10ctf changes sv_maxspeed to 400
WARNING: ctf_70mm13_10ctf changes sv_accelerate to 5.5
WARNING: ctf_70mm13_10ctf changes g_ctf_flag_returntime to 5
WARNING: ctf_70mm13_10ctf changes g_ctf_flagscore_capture to 20
WARNING: ctf_70mm13_10ctf changes g_ctf_flagscore_capture_team to 0
WARNING: ctf_70mm13_10ctf changes g_ctf_flagscore_pickup to 1
WARNING: ctf_70mm13_10ctf changes g_ctf_flagscore_return to 5
WARNING: ctf_70mm13_10ctf changes g_ctf_flagscore_return_rogue to 10
WARNING: ctf_70mm13_10ctf changes maxplayers to 12
WARNING: ctf_70mm13_11 changes g_balance_armor_limit to 150
WARNING: ctf_70mm13_11 changes g_balance_armor_regen to 0
WARNING: ctf_70mm13_11 changes g_balance_health_limit to 150
WARNING: ctf_70mm13_11 changes g_balance_health_regen to 0
WARNING: ctf_70mm13_11 changes g_start_weapon_laser to 1
WARNING: ctf_70mm13_11 changes g_start_weapon_shotgun to 1
WARNING: ctf_70mm13_11 changes sv_gravity to 800
WARNING: ctf_70mm13_11 changes sv_friction to 5
WARNING: ctf_70mm13_11 changes sv_maxspeed to 400
WARNING: ctf_70mm13_11 changes sv_accelerate to 5.5
WARNING: ctf_70mm13_11 changes g_ctf_flag_returntime to 5
WARNING: ctf_70mm13_11 changes g_ctf_flagscore_capture to 20
WARNING: ctf_70mm13_11 changes g_ctf_flagscore_capture_team to 0
WARNING: ctf_70mm13_11 changes g_ctf_flagscore_pickup to 1
WARNING: ctf_70mm13_11 changes g_ctf_flagscore_return to 5
WARNING: ctf_70mm13_11 changes g_ctf_flagscore_return_rogue to 10
WARNING: ctf_70mm13_11 changes maxplayers to 12
WARNING: ctf_70mm13_12 changes g_balance_armor_limit to 150
WARNING: ctf_70mm13_12 changes g_balance_armor_regen to 0
WARNING: ctf_70mm13_12 changes g_balance_health_limit to 150
WARNING: ctf_70mm13_12 changes g_balance_health_regen to 0
WARNING: ctf_70mm13_12 changes g_start_weapon_laser to 1
WARNING: ctf_70mm13_12 changes g_start_weapon_shotgun to 1
WARNING: ctf_70mm13_12 changes sv_gravity to 800
WARNING: ctf_70mm13_12 changes sv_friction to 5
WARNING: ctf_70mm13_12 changes sv_maxspeed to 400
WARNING: ctf_70mm13_12 changes sv_accelerate to 5.5
WARNING: ctf_70mm13_12 changes g_ctf_flag_returntime to 5
WARNING: ctf_70mm13_12 changes g_ctf_flagscore_capture to 20
WARNING: ctf_70mm13_12 changes g_ctf_flagscore_capture_team to 0
WARNING: ctf_70mm13_12 changes g_ctf_flagscore_pickup to 1
WARNING: ctf_70mm13_12 changes g_ctf_flagscore_return to 5
WARNING: ctf_70mm13_12 changes g_ctf_flagscore_return_rogue to 10
WARNING: ctf_70mm13_12 changes maxplayers to 12
WARNING: dm_70mm13_9 changes g_balance_armor_limit to 100
WARNING: dm_70mm13_9 changes g_balance_armor_regen to 0
WARNING: dm_70mm13_9 changes g_balance_health_limit to 200
WARNING: dm_70mm13_9 changes g_balance_health_regen to 0
WARNING: dm_70mm13_9 changes g_start_weapon_laser to 1
WARNING: dm_70mm13_9 changes g_start_weapon_shotgun to 0
WARNING: dm_70mm13_9 changes sv_gravity to 800
WARNING: dm_70mm13_9 changes sv_friction to 5
WARNING: dm_70mm13_9 changes sv_maxspeed to 400
WARNING: dm_70mm13_9 changes sv_accelerate to 5.5
WARNING: dm_evilminsta changes g_minstagib to 1
WARNING: dm_minstarena changes g_minstagib to 1
WARNING: dm_suicidebooth-0.1 changes g_rocketarena to 1
So the full list of possibly dangerous maps are: anything by 70mm13 (please fix this!), evilminsta (please add exit_cfg or remove the g_minstagib), minstarena (also misses the exit_cfg), suidicebooth.
Some of the named maps surely use exit_cfg to fix this, but my script doesn't verify that - it checks for variables a mapcfg changes, ignores exit_cfg and inserts its own backup/restore mechanism; a mapcfg written by it looks like
- Code: Select all
rbi_reset
set rbi_backup_g_balance_armor_limit $g_balance_armor_limit
set g_balance_armor_limit 150
set rbi_backup_g_balance_armor_regen $g_balance_armor_regen
set g_balance_armor_regen 0
set rbi_backup_g_balance_health_limit $g_balance_health_limit
set g_balance_health_limit 150
set rbi_backup_g_balance_health_regen $g_balance_health_regen
set g_balance_health_regen 0
set rbi_backup_g_start_weapon_laser $g_start_weapon_laser
set g_start_weapon_laser 1
set rbi_backup_g_start_weapon_shotgun $g_start_weapon_shotgun
set g_start_weapon_shotgun 1
set rbi_backup_sv_gravity $sv_gravity
set sv_gravity 800
set rbi_backup_sv_friction $sv_friction
set sv_friction 5
set rbi_backup_sv_maxspeed $sv_maxspeed
set sv_maxspeed 400
set rbi_backup_sv_accelerate $sv_accelerate
set sv_accelerate 5.5
set g_ctf 1
set rbi_backup_g_ctf_flag_returntime $g_ctf_flag_returntime
set g_ctf_flag_returntime 5
set rbi_backup_g_ctf_flagscore_capture $g_ctf_flagscore_capture
set g_ctf_flagscore_capture 20
set rbi_backup_g_ctf_flagscore_capture_team $g_ctf_flagscore_capture_team
set g_ctf_flagscore_capture_team 0
set rbi_backup_g_ctf_flagscore_pickup $g_ctf_flagscore_pickup
set g_ctf_flagscore_pickup 1
set rbi_backup_g_ctf_flagscore_return $g_ctf_flagscore_return
set g_ctf_flagscore_return 5
set rbi_backup_g_ctf_flagscore_return_rogue $g_ctf_flagscore_return_rogue
set g_ctf_flagscore_return_rogue 10
set fraglimit 200
set timelimit 60
set rbi_backup_maxplayers $maxplayers
set maxplayers 12
changelevel 70mm13_10ctf
alias rbi_reset "set g_balance_armor_limit $rbi_backup_g_balance_armor_limit ; set g_balance_armor_regen $rbi_backup_g_balance_armor_regen ; set g_balance_health_limit $rbi_backup_g_balance_health_limit ; set g_balance_health_regen $rbi_backup_g_balance_health_regen ; set g_start_weapon_laser $rbi_backup_g_start_weapon_laser ; set g_start_weapon_shotgun $rbi_backup_g_start_weapon_shotgun ; set sv_gravity $rbi_backup_sv_gravity ; set sv_friction $rbi_backup_sv_friction ; set sv_maxspeed $rbi_backup_sv_maxspeed ; set sv_accelerate $rbi_backup_sv_accelerate ; set g_ctf_flag_returntime $rbi_backup_g_ctf_flag_returntime ; set g_ctf_flagscore_capture $rbi_backup_g_ctf_flagscore_capture ; set g_ctf_flagscore_capture_team $rbi_backup_g_ctf_flagscore_capture_team ; set g_ctf_flagscore_pickup $rbi_backup_g_ctf_flagscore_pickup ; set g_ctf_flagscore_return $rbi_backup_g_ctf_flagscore_return ; set g_ctf_flagscore_return_rogue $rbi_backup_g_ctf_flagscore_return_rogue ; set maxplayers $rbi_backup_maxplayers ; "
This rbi_reset stuff is similar to exit_cfg, I actually could also put the "rbi_reset" call into the exit_cfg and make the script kill exit_cfg changes...
Anyway, mappers should never touch these settings. If a map is for Minstagib only, DO NOT PUT g_minstagib 1 IN THE MAPCFG! INSTEAD, TELL ADMINS TO ONLY RUN IT IN MINSTAGIB! Also, you can make your point more clear by putting some Nexes and cells on the map, but nothing else. If you really think you must change such stuff, use the exit_cfg system, as described above.
But - changing game_reset.cfg to also reset mutators is BAD, as it no longer allows you to run a Minstagib-only server!
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again
You can vary the number of "MS", so you can clearly see it's MS which is causing it.