This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package mindustry.entities.comp;
|
||||
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
@@ -34,7 +33,7 @@ abstract class HealthComp implements Entityc, Posc{
|
||||
void kill(){
|
||||
if(dead) return;
|
||||
|
||||
health = 0;
|
||||
health = Math.min(health, 0);
|
||||
dead = true;
|
||||
killed();
|
||||
remove();
|
||||
@@ -86,7 +85,7 @@ abstract class HealthComp implements Entityc, Posc{
|
||||
}
|
||||
|
||||
void clampHealth(){
|
||||
health = Mathf.clamp(health, 0, maxHealth);
|
||||
health = Math.min(health, maxHealth);
|
||||
}
|
||||
|
||||
/** Heals by a flat amount. */
|
||||
|
||||
Reference in New Issue
Block a user