Disable falling damage for godmode

This commit is contained in:
hatsune-miku 2022-05-09 17:51:46 -02:30 committed by Melledy
parent c2230485c1
commit f5509d1e7d

View File

@ -102,6 +102,10 @@ public class HandlerCombatInvocationsNotify extends PacketHandler {
if (cachedLandingSpeed < -28) {
damageFactor = 1f;
}
// Disable falling damage for players in god mode.
if (session.getPlayer() != null && session.getPlayer().inGodmode()) {
damageFactor = 0;
}
float damage = maxHP * damageFactor;
float newHP = currentHP - damage;
if (newHP < 0) {