Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
fix: immortal player bug
Browse files Browse the repository at this point in the history
  • Loading branch information
leia-uwu committed Jan 4, 2024
1 parent 3980fe1 commit 6bd92e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objects/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export class Player extends GameObject implements PlayerFullData, PlayerPartialD
finalDamage -= finalDamage * helmet.damageReduction;
}

if (this._health - finalDamage < 0) finalDamage += this._health - finalDamage;
if (this._health - finalDamage < 0) finalDamage = this.health;

this.damageTaken += finalDamage;
if (source instanceof Player) source.damageDealt += finalDamage;
Expand Down

0 comments on commit 6bd92e5

Please sign in to comment.