This commit is contained in:
Anuken
2021-06-28 10:50:04 -04:00
parent 8afea88023
commit a5c44e7998
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -1610,7 +1610,7 @@ public class Blocks implements ContentList{
size = 2; size = 2;
range = 190f; range = 190f;
reloadTime = 34f; reloadTime = 31f;
restitution = 0.03f; restitution = 0.03f;
ammoEjectBack = 3f; ammoEjectBack = 3f;
cooldown = 0.03f; cooldown = 0.03f;
+1 -1
View File
@@ -572,7 +572,7 @@ public class UnitTypes implements ContentList{
speed = 1f; speed = 1f;
splashDamageRadius = 60f; splashDamageRadius = 60f;
instantDisappear = true; instantDisappear = true;
splashDamage = 88f; splashDamage = 90f;
killShooter = true; killShooter = true;
hittable = false; hittable = false;
collidesAir = true; collidesAir = true;
@@ -1,6 +1,5 @@
package mindustry.entities.comp; package mindustry.entities.comp;
import arc.math.*;
import arc.util.*; import arc.util.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.gen.*; import mindustry.gen.*;
@@ -34,7 +33,7 @@ abstract class HealthComp implements Entityc, Posc{
void kill(){ void kill(){
if(dead) return; if(dead) return;
health = 0; health = Math.min(health, 0);
dead = true; dead = true;
killed(); killed();
remove(); remove();
@@ -86,7 +85,7 @@ abstract class HealthComp implements Entityc, Posc{
} }
void clampHealth(){ void clampHealth(){
health = Mathf.clamp(health, 0, maxHealth); health = Math.min(health, maxHealth);
} }
/** Heals by a flat amount. */ /** Heals by a flat amount. */
@@ -397,7 +397,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
//move down //move down
elevation -= type.fallSpeed * Time.delta; elevation -= type.fallSpeed * Time.delta;
if(isGrounded()){ if(isGrounded() || health <= -maxHealth){
Call.unitDestroy(id); Call.unitDestroy(id);
} }
} }
@@ -528,7 +528,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Override @Override
public void killed(){ public void killed(){
wasPlayer = isLocal(); wasPlayer = isLocal();
health = 0; health = Math.min(health, 0);
dead = true; dead = true;
//don't waste time when the unit is already on the ground, just destroy it //don't waste time when the unit is already on the ground, just destroy it