Difference between revisions of "S PreserveEnts"

From Valve Developer Community
Jump to: navigation, search
m (description, hinting 'AddOutput' classname changing)
m (Code Dumps: added actual steps instead of a mysterious address)
Line 394: Line 394:
 
== Code Dumps ==
 
== Code Dumps ==
 
=== {{l4d}} Left 4 Dead ===
 
=== {{l4d}} Left 4 Dead ===
22/07/2021 - Address<code>105AFCE0</code>is to be jumped to. The list at address<code>105A92A0</code>is a {{css}} leftover.
+
22/07/2021 - Steps: [IDA]<br>
 +
1. Search for the<code>ai_network</code>string reference.<br>
 +
2. Bring up the XREFs of the reference.<br>
 +
3. Find the list that has both<code>survivor_bot</code>and<code>logic_versus_random</code>in it, as the one without both is a {{css}} leftover.
 
{{ExpandBox|
 
{{ExpandBox|
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
Line 446: Line 449:
  
 
=== {{l4d2}} Left 4 Dead 2 ===
 
=== {{l4d2}} Left 4 Dead 2 ===
21/07/2021 - Address<code>107A8D64</code>is to be jumped to.
+
22/07/2021 - Steps: [IDA]<br>
 +
1. Search for the<code>ai_network</code>string reference.<br>
 +
2. Bring up the XREFs of the reference.<br>
 +
3. Find the list that has both<code>survivor_bot</code>and<code>logic_versus_random</code>in it.
 
{{ExpandBox|
 
{{ExpandBox|
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">

Revision as of 01:33, 15 August 2021

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, as the one without both is a Counter-Strike: Source leftover.



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.