s_PreserveEnts

From Valve Developer Community
Revision as of 01:35, 15 August 2021 by Orinuse (talk | contribs) ({{l4d}} Left 4 Dead: removed confusing note)
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 - Steps: [IDA]
1. Search for theai_networkstring reference.
2. Bring up the XREFs of the reference.
3. Find the list that has bothsurvivor_botandlogic_versus_randomin it.



Left 4 Dead 2 Left 4 Dead 2

22/07/2021 - Steps: [IDA]
1. Search for theai_networkstring reference.
2. Bring up the XREFs of the reference.
3. Find the list that has bothsurvivor_botandlogic_versus_randomin it.