This commit is contained in:
Anuken
2020-12-25 12:34:02 -05:00
parent 42d350f87f
commit bba52e99e0
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -317,7 +317,11 @@ public class TypeIO{
return player;
}else if(type == 1){ //formation controller
int id = read.i();
return prev instanceof FormationAI ? prev : new FormationAI(Groups.unit.getByID(id), null);
if(prev instanceof FormationAI f){
f.leader = Groups.unit.getByID(id);
return f;
}
return new FormationAI(Groups.unit.getByID(id), null);
}else if(type == 3){
int pos = read.i();
if(prev instanceof LogicAI pai){