[Any] Map end cvars reset (sv_gravity, phys_timescale, phys_pushscale, etc...)

Running a soccer server which also has volleyball and other sports maps, I needed to find a way to reset the gravity, timescale and pushscale back to default values before mapchange.

If you just set phys_timescale 1 in your server.cfg or in your map configs, the nextmap will still have a weird physcale. You need to change the map again to have it fixed. The server acts like it considers the value of the previous map instead of the one written in your server.cfg, even though the server.cfg is to be loaded at start up of any map... which is a common bug of CS:S.

This plugin fixes the bug by allowing you to reset any cvar you want at map end.



I know there are some maps on TF2 where there is the same problem, so I think this plugin can be useful for other mods than CS:S.



The main advantage of this plugin is that it works even with a manual or rtv mapchange.



All comments are welcome.



St00ne



USAGE:

Download mapend_cvars_reset.smx and place it to your addons/sourcemod/plugins folder.

Download mapend_cvars_reset.sp and place it to your addons/sourcemod/scripting folder.

Download mapend_cvars_reset.cfg and place it to your cfg/sourcemod folder.



Add any command you want to the mapend_cvars_reset.cfg file like this:


Code:


phys_timescale "1"

phys_pushscale "1"

sv_gravity "800"


Thanks to Bacardi and DarthNinja.



Server using this plugin: 188.165.210.132:27019; Clan ffa server: 188.165210.132:27015; Tf2 servers and more at www.esc90.fr.















Attached Files








File Type: sp


Get Plugin or
Get Source (mapend_cvars_reset.sp - 583 Bytes)


File Type: cfg


mapend_cvars_reset.cfg (50 Bytes)








Orignal From: [Any] Map end cvars reset (sv_gravity, phys_timescale, phys_pushscale, etc...)

No comments

Not a single link is allowed to submit in comment :o