Skip to content

Commit

Permalink
Merge branch 'SirPlease:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
altair-sossai authored Sep 8, 2024
2 parents 53706c4 + 45e7385 commit 02c1064
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Binary file modified addons/sourcemod/plugins/optional/l4d2_fix_spawn_order.smx
Binary file not shown.
14 changes: 11 additions & 3 deletions addons/sourcemod/scripting/l4d2_fix_spawn_order.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <left4dhooks>
#include <l4d2util_infected>

#define PLUGIN_VERSION "4.4.2"
#define PLUGIN_VERSION "4.4.3"

public Plugin myinfo =
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 02c1064

Please sign in to comment.