Fixed ghost units appearing in certain situations

This commit is contained in:
Anuken
2020-08-26 12:25:27 -04:00
parent 9735e18acf
commit 0b6ef1c57c
4 changed files with 17 additions and 4 deletions

View File

@@ -31,6 +31,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Import float x, y, rotation, elevation, maxHealth, drag, armor, hitSize, health;
@Import boolean dead;
@Import Team team;
@Import int id;
private UnitController controller;
private UnitType type;
@@ -389,6 +390,6 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
if(dead || net.client()) return;
//deaths are synced; this calls killed()
Call.unitDeath(base());
Call.unitDeath(id);
}
}