s_PreserveEnts

From Valve Developer Community
Revision as of 14:18, 21 July 2021 by Orinuse (talk | contribs) (description, hinting 'AddOutput' classname changing)
Jump to: navigation, search

In multiplayer Source games, during a round reset, all entities are resetted to their defaults by being deleted then respawned, unless their current classnames matches an entry in the whitelist s_PreserveEnts. Whitelisted entities either has special code to handle the resetting process, and isn't ideal to be deleted.

Some whitelist entities however don't account round resets properly with their new behavior, so when a round reset occurs, their properties are carried over from the last round, like their origins.

To do: Attempt to finish this table. Some games might not have any way to reset the round (even throughmp_forcewinormp_restartgamecommands).

Games Alien Swarm Counter-Strike: Global Offensive Counter-Strike: Source Day of Defeat: Source Half-Life 2 Half-Life 2: DeathmatchHalf-Life 2: Deathmatch Half-Life 2: Episode OneHalf-Life 2: Episode One Half-Life 2: Episode TwoHalf-Life 2: Episode Two Left 4 Dead Left 4 Dead 2 Portal Portal 2 Team Fortress 2
Has Whitelist Yes Yes Yes Yes No Yes No No From code dump From code dump Yes Unsure Yes

Source Code

Half-Life 2hl2mp/hl2mp_gamerules.cpp



Portalportal/portal_mp_gamerules.cpp



Team Fortress 2tf/tf_gamerules.cpp



Counter-Strike: Sourcecstrike/cs_gamerules.cpp



Counter-Strike: Global Offensivecstrike15/cs_gamerules.cpp



Day of Defeat: Sourcedod/dod_gamerules.cpp



Alien Swarmswarm/asw_gamerules.cpp



Code Dumps

Left 4 Dead Left 4 Dead

22/07/2021 - Address105AFCE0is to be jumped to. The list at address105A92A0is a Counter-Strike: Source leftover.



Left 4 Dead 2 Left 4 Dead 2

21/07/2021 - Address107A8D64is to be jumped to.