S PreserveEnts: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:s_PreserveEnts}} In multiplayer Source games, when a round is reset in some way, all entities are deleted and then respawned to quickly reset the map. However,...")
 
(Updated tf2 list with most recent version from 2018, by reverse-engineered binaries)
Line 128: Line 128:
"keyframe_rope",
"keyframe_rope",
"move_rope",
"move_rope",
"tf_viewmodel",
"tf_",
"", // END Marker
        "tf_logic_training",
"tf_logic_training_mode",
        "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",
        "func_upgradestation",
"entity_rocket",
        "entity_carrier",
"entity_sign",
        "entity_saucer",
        "tf_halloween_gift_pickup",
        "tf_logic_competitive",
        "tf_wearable_razorback",
};
};
</pre>
</pre>

Revision as of 13:36, 27 November 2018

In multiplayer Source games, when a round is reset in some way, all entities are deleted and then respawned to quickly reset the map. However, a list of entities to not reset exists. Usually these entities have special code to handle the resetting process. The 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.

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: Unsure Unsure Yes Yes N/A Yes N/A N/A Unsure Unsure Yes Unsure Yes

Half-Life 2hl2mp/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
};

Portalportal/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
};

Team Fortress 2tf/tf_gamerules.cpp

static const char *s_PreserveEnts[] =
{
	"tf_gamerules",
	"tf_team_manager",
	"tf_player_manager",
	"tf_team",
	"tf_objective_resource",
	"keyframe_rope",
	"move_rope",
	"tf_",
        "tf_logic_training",
	"tf_logic_training_mode",
        "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",
        "func_upgradestation",
	"entity_rocket",
        "entity_carrier",
	"entity_sign",
        "entity_saucer",
        "tf_halloween_gift_pickup",
        "tf_logic_competitive",
        "tf_wearable_razorback",
};

Counter-Strike: Sourcecstrike/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
};

Day of Defeat: Sourcedod/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
};