Made units self-destruct after spawner removal

This commit is contained in:
Anuken
2018-08-03 20:22:33 -04:00
parent 1dd6e66167
commit f30ea80b42
3 changed files with 10 additions and 4 deletions

View File

@@ -329,6 +329,10 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
if(!Net.client()){
avoidOthers(8f);
if(spawner != -1 && (world.tile(spawner) == null || world.tile(spawner).entity == null)){
damage(health);
}
}
if(squad != null){