Skip to content

Commit

Permalink
Merge pull request #13 from inferno-collection/feature/fixLadderPickup
Browse files Browse the repository at this point in the history
Nullify `_carryingLadder` after ladder is stored
  • Loading branch information
cm8263 authored Sep 28, 2023
2 parents 009ac4e + 4998fe7 commit 164044c
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 164044c

Please sign in to comment.