Skip to content

Commit

Permalink
Nullify _carryingLadder after ladder is stored
Browse files Browse the repository at this point in the history
  • Loading branch information
cm8263 committed Sep 28, 2023
1 parent 009ac4e commit 4998fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Client/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ internal async void OnCollect(int networkId)
Tick += CarryingTick;
}

[EventHandler("Inferno-Collection:Client:Ladders:Store")]
internal void OnStore() => _carryingLadder = null;

[EventHandler("Inferno-Collection:Client:Ladders:Attach")]
internal async void OnAttach(int playerId, int networkId, bool onBack = false)
{
Expand Down
1 change: 1 addition & 0 deletions Server/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ internal void StoreLadder(Player source)
}

source.State.Set("ICCarryingLadder", -1, true);
source.TriggerEvent("Inferno-Collection:Client:Ladders:Store");

_createdLadders.Remove(entity.Handle);

Expand Down

0 comments on commit 4998fe7

Please sign in to comment.