View Single Post
Author Message
St00ne
Veteran Member
Join Date: Jan 2011
Location: Annecy - France
Old 05-06-2012 , 20:33   [Any] Map end cvars reset (sv_gravity, phys_timescale, phys_pushscale, etc...) [v2.1]
Reply With Quote #1

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... this 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.

EDIT: On TF2, for projectiles, it only works with normal map change (max frags limit reached for example), and not with admin or rtv map change. I'll try to see if I can fix that.
PS: Round End version -> https://forums.alliedmods.net/showpo...51&postcount=7

All comments are welcome.

St00ne

Installation:
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.

Usage:
Add any command you want to the mapend_cvars_reset.cfg file like this:
Code:
phys_timescale "1"
phys_pushscale "1"
sv_gravity "800"


Additional information:
Servers using this plugin:
http://www.game-monitor.com/search.p...ars_reset_ver=
http://www.gametracker.com/search/?s...=&sort=&order=

Thanks to Bacardi and DarthNinja.
Attached Files
File Type: cfg mapend_cvars_reset.cfg (50 Bytes, 788 views)
File Type: sp Get Plugin or Get Source (mapend_cvars_reset.sp - 1933 views - 1.3 KB)
__________________

*** *** ***
-My plugins-

Last edited by St00ne; 08-11-2019 at 01:47. Reason: v2.1
St00ne is offline