cancel on take damage everytime you take damage
This commit is contained in:
1 parent
4a7a999ed1
commit
8d4fb261b5
1 file changed
+3
@@ -1214,6 +1214,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
oldHealth = this.health.get();
|
||||
newHealth = oldHealth + value;
|
||||
|
||||
if(newHealth < oldHealth)//took damage
|
||||
this.cancelOnTakeDamage();
|
||||
|
||||
if (newHealth > this.healthMax)
|
||||
newHealth = healthMax;
|
||||
|
||||
|
||||
Reference in new issue
Block a user