diff --git a/addons/sourcemod/plugins/optional/l4d2_fix_spawn_order.smx b/addons/sourcemod/plugins/optional/l4d2_fix_spawn_order.smx index 8971d6227..7baa363e2 100644 Binary files a/addons/sourcemod/plugins/optional/l4d2_fix_spawn_order.smx and b/addons/sourcemod/plugins/optional/l4d2_fix_spawn_order.smx differ diff --git a/addons/sourcemod/scripting/l4d2_fix_spawn_order.sp b/addons/sourcemod/scripting/l4d2_fix_spawn_order.sp index e71617b2b..6ca924bd7 100644 --- a/addons/sourcemod/scripting/l4d2_fix_spawn_order.sp +++ b/addons/sourcemod/scripting/l4d2_fix_spawn_order.sp @@ -5,7 +5,7 @@ #include #include -#define PLUGIN_VERSION "4.4.2" +#define PLUGIN_VERSION "4.4.3" public Plugin myinfo = { @@ -145,11 +145,19 @@ void ToggleEvents(bool isEnable) // 2. Return zombie class, based on the player state: ghost to the beginning, materialized to the end. // -public void L4D_OnMaterializeFromGhost(int client) +public Action L4D_OnMaterializeFromGhostPre(int client) { PrintDebug("\x05%N \x05materialized \x01as (\x04%s\x01)", client, L4D2_InfectedNames[GetInfectedClass(client)]); - + g_bPlayerSpawned[client] = true; + return Plugin_Continue; +} + +public void L4D_OnMaterializeFromGhost_PostHandled(int client) +{ + PrintDebug("\x05%N \x05got de-materialized because of other plugins' handling.", client); + + g_bPlayerSpawned[client] = false; } void Event_PlayerTeam(Event event, const char[] name, bool dontBroadcast)