Skip to content

Commit

Permalink
Fix error from doors during plugin start (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo authored Dec 12, 2023
1 parent ab94887 commit 87a9774
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion addons/sourcemod/scripting/scp_sf.sp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public void OnPluginStart()

ConVar_Setup();
SDKHook_Setup();
Doors_Clear();

HookEvent("teamplay_round_start", OnRoundStart, EventHookMode_PostNoCopy);
HookEvent("teamplay_round_win", OnRoundEnd, EventHookMode_PostNoCopy);
Expand Down Expand Up @@ -568,7 +569,7 @@ public void OnRoundStart(Event event, const char[] name, bool dontBroadcast)
}
}

Doors_RoundStart();
Doors_Clear();
Items_RoundStart();
// see comments in szf.sp for why this is here
SZF_RoundStartDelayed();
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/scp_sf/doors.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ StringMap DoorNameToActivator;
// this is needed for frag grenade/scp18/096 door destruction logic
// however, maps use scp_access relays for checks, which we will abuse to find what is a "checkpoint" door

void Doors_RoundStart()
void Doors_Clear()
{
delete DoorNameToActivator;
DoorNameToActivator = new StringMap();
Expand Down

0 comments on commit 87a9774

Please sign in to comment.