mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 02:22:54 +00:00
fix: poison setting life to 1hp
This commit is contained in:
parent
5f71ac96ff
commit
a204ec52f4
|
|
@ -137,12 +137,9 @@ void MobEffect::applyEffectTick(shared_ptr<LivingEntity> mob, int amplification)
|
|||
}
|
||||
else if (id == poison->id)
|
||||
{
|
||||
float health = mob->getHealth();
|
||||
if (health > 1.0f)
|
||||
if (mob->getHealth() > 1.0f)
|
||||
{
|
||||
float safeDmg = health - 1.0f;
|
||||
if (safeDmg > 0.0f)
|
||||
mob->hurt(DamageSource::magic, safeDmg);
|
||||
mob->hurt(DamageSource::magic, 1.0f);
|
||||
}
|
||||
}
|
||||
else if (id == wither->id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue