Skip to content

Commit

Permalink
player/player.go: Fix attack immunity duration check
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Nov 27, 2024
1 parent 9a8b082 commit b3bfe93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func (p *Player) Hurt(dmg float64, src world.DamageSource) (float64, bool) {
}
totalDamage := p.FinalDamageFrom(dmg, src)
damageLeft := totalDamage
if p.immuneUntil.Before(time.Now()) {
if time.Now().Before(p.immuneUntil) {
if damageLeft = damageLeft - p.lastDamage; damageLeft <= 0 {
return 0, false
}
Expand Down

0 comments on commit b3bfe93

Please sign in to comment.