Skip to content

Commit

Permalink
fix: warning
Browse files Browse the repository at this point in the history
  • Loading branch information
derkalle4 committed Dec 29, 2024
1 parent a40ea20 commit d87ef84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/RollTheDice+DiceIncreaseSpeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ private void DiceIncreaseSpeedReset()
private HookResult EventDiceIncreaseSpeedOnPlayerHurt(EventPlayerHurt @event, GameEventInfo info)
{
var victim = @event.Userid;
// ignore if victim is null
if (victim == null) return HookResult.Continue;
// ignore if player is not in the list
if (!_playersWithIncreasedSpeed.Contains(victim)) return HookResult.Continue;
// check if player is valid
Expand Down

0 comments on commit d87ef84

Please sign in to comment.