s_PreserveEnts

From Valve Developer Community
Revision as of 04:18, 21 July 2021 by Orinuse (talk | contribs) (l4d2 s_PreserveEnts; added "Code Dumps" section)
Jump to: navigation, search

In multiplayer Source games, during a round reset, all entities are resetted by being deleted then quickly respawned, unless they are under a whitelist. Usually these entities have special code to handle the resetting process, or isn't ideal to be. Theplayerentity for example, should not ever be erased unless the client disconnects from the server.

Some entities in this list however, do not have any code for handling round resets, so when the reset occurs, those entities will behave in unwanted ways as they have carried over all their properties (including position) from the last round.

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

Alien Swarm Counter-Strike: Global Offensive Counter-Strike: Source Day of Defeat: Source Half-Life 2 HL2:DM HL2:Ep1 HL2:Ep2 Left 4 Dead Left 4 Dead 2 Portal Portal 2 Team Fortress 2
Affects: Yes Yes Yes Yes N/A Yes N/A N/A Unsure 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 2 Left 4 Dead 2

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