This commit is contained in:
@@ -397,7 +397,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
//move down
|
||||
elevation -= type.fallSpeed * Time.delta;
|
||||
|
||||
if(isGrounded()){
|
||||
if(isGrounded() || health <= -maxHealth){
|
||||
Call.unitDestroy(id);
|
||||
}
|
||||
}
|
||||
@@ -528,7 +528,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
@Override
|
||||
public void killed(){
|
||||
wasPlayer = isLocal();
|
||||
health = 0;
|
||||
health = Math.min(health, 0);
|
||||
dead = true;
|
||||
|
||||
//don't waste time when the unit is already on the ground, just destroy it
|
||||
|
||||
Reference in New Issue
Block a user