Mikusch / ChaosModTF2

Chaos Mod for Team Fortress 2, powered by SourceMod and VScript
GNU General Public License v3.0
15 stars 5 forks source link

sm_chaos_enabled seems to persist between map changes #16

Closed Tiagoquix closed 10 months ago

Mikusch commented 10 months ago

What's the issue? It's a convar so it will persist until you change it back.

Tiagoquix commented 10 months ago

Ideally, the sm_chaos_enabled ConVar should be reset to the default value (0) after a map change if the map is changed while the chaos from the plugin is happening.

In my opinion, activating the Chaos Mod plugin is session-only, as most of the time (also from my point of view) it is enabled manually by the server admins, and it is not something you leave enabled by default (especially considering the default intervals/cooldowns).

I don't see a problem with maintaining the current form of the plugin if a CFG is auto-generated for the plugin in tf/cfg/sourcemod.

However, if you prefer not to make an auto-generated CFG for the plugin, it is safer to make the ConVar not persist between map changes.

Maybe it's a habit of mine, but I have the idea that several plugins that don't have a CFG in tf/cfg/sourcemod self-deactivate after map changes.

Mikusch commented 10 months ago

That would kinda go against expected behavior for most server operators. If you want it to disable after a map change, set the convar to 0 in your server.cfg or any other config that runs once per map.