S PreserveEnts: Difference between revisions
Jump to navigation
Jump to search
(Updated tf2) |
(l4d2 s_PreserveEnts; added "Code Dumps" section) |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
{{DISPLAYTITLE:s_PreserveEnts}} | {{DISPLAYTITLE:s_PreserveEnts}} | ||
In multiplayer Source games, | 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. The{{ent|player}}entity 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. | 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. | ||
Line 20: | Line 20: | ||
||N/A | ||N/A | ||
||{{style|color:yellow|Unsure}} | ||{{style|color:yellow|Unsure}} | ||
||{{style|color: | ||{{style|color:orange|From code dump}} | ||
||{{style|color:green|Yes}} | ||{{style|color:green|Yes}} | ||
||{{style|color:yellow|Unsure}} | ||{{style|color:yellow|Unsure}} | ||
Line 26: | Line 26: | ||
|} | |} | ||
=={{hl2}}hl2mp/hl2mp_gamerules.cpp== | == Source Code == | ||
< | ==={{hl2}}hl2mp/hl2mp_gamerules.cpp=== | ||
{{ExpandBox| | |||
<syntaxhighlight lang="cpp"> | |||
static const char *s_PreserveEnts[] = | static const char *s_PreserveEnts[] = | ||
{ | { | ||
Line 70: | Line 72: | ||
"", // END Marker | "", // END Marker | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
}} | |||
=={{portal}}portal/portal_mp_gamerules.cpp== | ==={{portal}}portal/portal_mp_gamerules.cpp=== | ||
< | {{ExpandBox| | ||
<syntaxhighlight lang="cpp"> | |||
static const char *s_PreserveEnts[] = | static const char *s_PreserveEnts[] = | ||
{ | { | ||
Line 116: | Line 120: | ||
"", // END Marker | "", // END Marker | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
}} | |||
=={{tf2}}tf/tf_gamerules.cpp== | ==={{tf2}}tf/tf_gamerules.cpp=== | ||
< | {{ExpandBox| | ||
<syntaxhighlight lang="cpp"> | |||
static const char *s_PreserveEnts[] = | static const char *s_PreserveEnts[] = | ||
{ | { | ||
Line 186: | Line 192: | ||
"", // END Marker | "", // END Marker | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
}} | |||
=={{css}}cstrike/cs_gamerules.cpp== | ==={{css}}cstrike/cs_gamerules.cpp=== | ||
< | {{ExpandBox| | ||
<syntaxhighlight lang="cpp"> | |||
static const char *s_PreserveEnts[] = | static const char *s_PreserveEnts[] = | ||
{ | { | ||
Line 233: | Line 241: | ||
"", // END Marker | "", // END Marker | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
=={{csgo}}cstrike15/cs_gamerules.cpp== | }} | ||
< | |||
==={{csgo}}cstrike15/cs_gamerules.cpp=== | |||
{{ExpandBox| | |||
<syntaxhighlight lang="cpp"> | |||
static const char *s_PreserveEnts[] = | static const char *s_PreserveEnts[] = | ||
{ | { | ||
Line 297: | Line 308: | ||
"", // END Marker | "", // END Marker | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
}} | |||
=={{dods}}dod/dod_gamerules.cpp== | ==={{dods}}dod/dod_gamerules.cpp=== | ||
< | {{ExpandBox| | ||
<syntaxhighlight lang="cpp"> | |||
static const char *s_PreserveEnts[] = | static const char *s_PreserveEnts[] = | ||
{ | { | ||
Line 342: | Line 355: | ||
"", // END Marker | "", // END Marker | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
}} | |||
=={{as}}swarm/asw_gamerules.cpp== | ==={{as}}swarm/asw_gamerules.cpp=== | ||
< | {{ExpandBox| | ||
<syntaxhighlight lang="cpp"> | |||
CAlienSwarm::CAlienSwarm() | CAlienSwarm::CAlienSwarm() | ||
{ | { | ||
Line 361: | Line 376: | ||
m_MapResetFilter.AddKeepEntity("ai_network"); | m_MapResetFilter.AddKeepEntity("ai_network"); | ||
} | } | ||
</syntaxhighlight> | |||
}} | |||
== Code Dumps == | |||
=== {{l4d2}} Left 4 Dead 2 === | |||
21/07/2021 - Address<code>107A8D64</code>is to be jumped to. | |||
{{ExpandBox| | |||
<pre> | |||
* ai_network, | |||
* ai_hint, | |||
* cs_team_manager, | |||
* terror_gamerules, | |||
* terror_player_manager, | |||
* survivor_bot, | |||
* env_tonemap_controller, | |||
* env_tonemap_controller_infected, | |||
* env_tonemap_controller_ghost, | |||
* vote_controller, | |||
* env_soundscape, | |||
* env_soundscape_proxy, | |||
* env_soundscape_triggerable, | |||
* env_sun, | |||
* env_wind, | |||
* env_fog_controller, | |||
* func_wall, | |||
* infodecal, | |||
* info_projecteddecal, | |||
* info_node, | |||
* info_node_hint, | |||
* info_map_parameters, | |||
* info_map_parameters_versus, | |||
* info_ladder, | |||
* func_simpleladder, | |||
* player, | |||
* point_viewcontrol, | |||
* scene_manager, | |||
* shadow_control, | |||
* sky_camera, | |||
* soundent, | |||
* trigger_soundscape, | |||
* viewmodel, | |||
* predicted_viewmodel, | |||
* worldspawn, | |||
* point_devshot_camera, | |||
* weapon_scavenge_item_spawn, | |||
* logic_versus_random, | |||
</pre> | </pre> | ||
}} |
Revision as of 04:18, 21 July 2021
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.
Todo: Attempt to finish this table. Some games might not have any way to reset the round (even through mp_forcewin or mp_restartgame).
!Template:Pergame | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Affects: | Yes | Yes | Yes | Yes | N/A | Yes | N/A | N/A | Unsure | From code dump | Yes | Unsure | Yes |
Source Code
hl2mp/hl2mp_gamerules.cpp
static const char *s_PreserveEnts[] =
{
"ai_network",
"ai_hint",
"hl2mp_gamerules",
"team_manager",
"player_manager",
"env_soundscape",
"env_soundscape_proxy",
"env_soundscape_triggerable",
"env_sun",
"env_wind",
"env_fog_controller",
"func_brush",
"func_wall",
"func_buyzone",
"func_illusionary",
"infodecal",
"info_projecteddecal",
"info_node",
"info_target",
"info_node_hint",
"info_player_deathmatch",
"info_player_combine",
"info_player_rebel",
"info_map_parameters",
"keyframe_rope",
"move_rope",
"info_ladder",
"player",
"point_viewcontrol",
"scene_manager",
"shadow_control",
"sky_camera",
"soundent",
"trigger_soundscape",
"viewmodel",
"predicted_viewmodel",
"worldspawn",
"point_devshot_camera",
"", // END Marker
};
portal/portal_mp_gamerules.cpp
static const char *s_PreserveEnts[] =
{
"ai_network",
"ai_hint",
"hl2mp_gamerules",
"team_manager",
"player_manager",
"env_soundscape",
"env_soundscape_proxy",
"env_soundscape_triggerable",
"env_sun",
"env_wind",
"env_fog_controller",
"func_brush",
"func_wall",
"func_buyzone",
"func_illusionary",
"infodecal",
"info_projecteddecal",
"info_node",
"info_target",
"info_node_hint",
"info_player_deathmatch",
"info_player_combine",
"info_player_rebel",
"info_map_parameters",
"keyframe_rope",
"move_rope",
"info_ladder",
"player",
"point_viewcontrol",
"scene_manager",
"shadow_control",
"sky_camera",
"soundent",
"trigger_soundscape",
"viewmodel",
"predicted_viewmodel",
"worldspawn",
"point_devshot_camera",
"", // END Marker
};
tf/tf_gamerules.cpp
static const char *s_PreserveEnts[] =
{
"player",
"viewmodel",
"worldspawn",
"soundent",
"ai_network",
"ai_hint",
"env_soundscape",
"env_soundscape_proxy",
"env_soundscape_triggerable",
"env_sprite",
"env_sun",
"env_wind",
"env_fog_controller",
"func_wall",
"func_illusionary",
"info_node",
"info_target",
"info_node_hint",
"point_commentary_node",
"point_viewcontrol",
"func_precipitation",
"func_team_wall",
"shadow_control",
"sky_camera",
"scene_manager",
"trigger_soundscape",
"commentary_auto",
"point_commentary_node",
"point_commentary_viewpoint",
"bot_roster",
"info_populator",
"tf_gamerules",
"tf_team_manager",
"tf_player_manager",
"tf_team",
"tf_objective_resource",
"keyframe_rope",
"move_rope",
"tf_viewmodel",
"tf_logic_training",
"tf_logic_training_mode",
"tf_logic_raid",
"tf_powerup_bottle",
"tf_mann_vs_machine_stats",
"tf_wearable",
"tf_wearable_demoshield",
"tf_wearable_robot_arm",
"tf_wearable_vm",
"tf_logic_bonusround",
"vote_controller",
"monster_resource",
"tf_logic_medieval",
"tf_logic_cp_timer",
"tf_logic_tower_defense",
"tf_logic_mann_vs_machine",
"func_upgradestation",
"entity_rocket",
"entity_carrier",
"entity_sign",
"entity_saucer",
"tf_halloween_gift_pickup",
"tf_logic_competitive",
"", // END Marker
};
cstrike/cs_gamerules.cpp
static const char *s_PreserveEnts[] =
{
"ai_network",
"ai_hint",
"cs_gamerules",
"cs_team_manager",
"cs_player_manager",
"env_soundscape",
"env_soundscape_proxy",
"env_soundscape_triggerable",
"env_sun",
"env_wind",
"env_fog_controller",
"func_brush",
"func_wall",
"func_buyzone",
"func_illusionary",
"func_hostage_rescue",
"func_bomb_target",
"infodecal",
"info_projecteddecal",
"info_node",
"info_target",
"info_node_hint",
"info_player_counterterrorist",
"info_player_terrorist",
"info_map_parameters",
"keyframe_rope",
"move_rope",
"info_ladder",
"player",
"point_viewcontrol",
"scene_manager",
"shadow_control",
"sky_camera",
"soundent",
"trigger_soundscape",
"viewmodel",
"predicted_viewmodel",
"worldspawn",
"point_devshot_camera",
"", // END Marker
};
cstrike15/cs_gamerules.cpp
static const char *s_PreserveEnts[] =
{
"ai_network",
"ai_hint",
"cs_gamerules",
"cs_team_manager",
"cs_player_manager",
"env_soundscape",
"env_soundscape_proxy",
"env_soundscape_triggerable",
"env_sun",
"env_wind",
"env_fog_controller",
"env_tonemap_controller",
"env_cascade_light",
"func_brush",
"func_wall",
"func_buyzone",
"func_illusionary",
"func_hostage_rescue",
"func_bomb_target",
"infodecal",
"info_projecteddecal",
"info_node",
"info_target",
"info_node_hint",
"info_player_counterterrorist",
"info_player_terrorist",
"info_enemy_terrorist_spawn",
"info_deathmatch_spawn",
"info_armsrace_counterterrorist",
"info_armsrace_terrorist",
"info_map_parameters",
"keyframe_rope",
"move_rope",
"info_ladder",
"player",
"point_viewcontrol",
"point_viewcontrol_multiplayer",
"scene_manager",
"shadow_control",
"sky_camera",
"soundent",
"trigger_soundscape",
"viewmodel",
"predicted_viewmodel",
"worldspawn",
"point_devshot_camera",
"logic_choreographed_scene",
"cfe_player_decal",
"info_bomb_target_hint_A",
"info_bomb_target_hint_B",
"info_hostage_rescue_zone_hint",
"generic_actor",
"vote_controller",
"wearable_item",
"point_hiding_spot",
"game_coopmission_manager",
"chicken",
"", // END Marker
};
dod/dod_gamerules.cpp
static const char *s_PreserveEnts[] =
{
"player",
"viewmodel",
"worldspawn",
"soundent",
"ai_network",
"ai_hint",
"dod_gamerules",
"dod_team_manager",
"dod_player_manager",
"dod_objective_resource",
"env_soundscape",
"env_soundscape_proxy",
"env_soundscape_triggerable",
"env_sprite",
"env_sun",
"env_wind",
"env_fog_controller",
"func_brush",
"func_wall",
"func_illusionary",
"info_node",
"info_target",
"info_node_hint",
"info_player_allies",
"info_player_axis",
"point_viewcontrol",
"shadow_control",
"sky_camera",
"scene_manager",
"trigger_soundscape",
"info_dod_detect",
"dod_team_allies",
"dod_team_axis",
"point_commentary_node",
"dod_round_timer",
"func_precipitation",
"func_team_wall",
"", // END Marker
};
swarm/asw_gamerules.cpp
CAlienSwarm::CAlienSwarm()
{
// set which entities should stay around when we restart the mission
m_MapResetFilter.AddKeepEntity("worldspawn");
m_MapResetFilter.AddKeepEntity("soundent");
m_MapResetFilter.AddKeepEntity("asw_gamerules");
m_MapResetFilter.AddKeepEntity("player");
m_MapResetFilter.AddKeepEntity("asw_player");
m_MapResetFilter.AddKeepEntity("player_manager");
m_MapResetFilter.AddKeepEntity("predicted_viewmodel");
m_MapResetFilter.AddKeepEntity("sdk_team_manager");
m_MapResetFilter.AddKeepEntity("scene_manager");
m_MapResetFilter.AddKeepEntity("event_queue_saveload_proxy");
m_MapResetFilter.AddKeepEntity("ai_network");
}
Code Dumps
Left 4 Dead 2
21/07/2021 - Address107A8D64
is to be jumped to.
* ai_network, * ai_hint, * cs_team_manager, * terror_gamerules, * terror_player_manager, * survivor_bot, * env_tonemap_controller, * env_tonemap_controller_infected, * env_tonemap_controller_ghost, * vote_controller, * env_soundscape, * env_soundscape_proxy, * env_soundscape_triggerable, * env_sun, * env_wind, * env_fog_controller, * func_wall, * infodecal, * info_projecteddecal, * info_node, * info_node_hint, * info_map_parameters, * info_map_parameters_versus, * info_ladder, * func_simpleladder, * player, * point_viewcontrol, * scene_manager, * shadow_control, * sky_camera, * soundent, * trigger_soundscape, * viewmodel, * predicted_viewmodel, * worldspawn, * point_devshot_camera, * weapon_scavenge_item_spawn, * logic_versus_random,