Skip to content

Commit

Permalink
Made exosuit stress sensor trigger from potentially lethal damage tha…
Browse files Browse the repository at this point in the history
…t would otherwise never trigger the sensor

Please factcheck this, I'm not entirely sure if the amount of damage is accurate taking armor and such into account

(cherry picked from commit d7aa2ab)
  • Loading branch information
Dudblockman committed May 17, 2021
1 parent 4f581f2 commit d81f8d7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ public static void onEntityDamage(LivingHurtEvent event) {
if (event.getSource().isFireDamage()) {
PsiArmorEvent.post(new PsiArmorEvent(player, PsiArmorEvent.ON_FIRE));
}
if (player.getHealth() - event.getAmount() <= 0.0) {
PsiArmorEvent.post(new PsiArmorEvent(player, PsiArmorEvent.LOW_HP));
PlayerDataHandler.get(player).lowHp = true;
}
}
}

Expand Down

0 comments on commit d81f8d7

Please sign in to comment.