Fixed mono presence "corrupting" older saves

This commit is contained in:
Anuken
2020-11-08 20:24:31 -05:00
parent 23403d0c51
commit 2d4f4015b1
5 changed files with 14 additions and 10 deletions

View File

@@ -2,17 +2,13 @@ package mindustry.ai.types;
import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.util.*;
import mindustry.ai.formations.*;
import mindustry.entities.units.*;
import mindustry.gen.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.storage.CoreBlock.*;
public class FormationAI extends AIController implements FormationMember{
private static Seq<Tile> tiles = new Seq<>();
public Unit leader;
private Vec3 target = new Vec3();
@@ -30,9 +26,8 @@ public class FormationAI extends AIController implements FormationMember{
@Override
public void updateUnit(){
UnitType type = unit.type;
if(leader.dead){
if(leader == null || leader.dead){
unit.resetController();
return;
}