Skip to content

Commit

Permalink
Don't crash if warp leave effect plays on a non-existent character
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 31, 2024
1 parent bb4e900 commit 8bf739f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void StartOtherCharacterAttackAnimation(int characterID, int noteIndex =

public void NotifyWarpLeaveEffect(int characterId, WarpEffect anim)
{
if (anim == WarpEffect.Admin)
if (anim == WarpEffect.Admin && _characterRendererProvider.CharacterRenderers.ContainsKey(characterId))
_characterRendererProvider.CharacterRenderers[characterId].PlayEffect((int)HardCodedEffect.WarpLeave);
else if (characterId != _characterRepository.MainCharacter.ID && anim == WarpEffect.Scroll)
_sfxPlayer.PlaySfx(SoundEffectID.ScrollTeleport);
Expand Down

0 comments on commit 8bf739f

Please sign in to comment.