1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 13:28:12 +03:00

Fixed logic controller updating (#5240)

This commit is contained in:
BenMan95 2021-05-13 12:07:30 -05:00 committed by GitHub
parent 1e1d7d2e92
commit 6398fed47b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,6 +339,7 @@ public class LExecutor{
public static LogicAI checkLogicAI(LExecutor exec, Object unitObj){
if(unitObj instanceof Unit unit && exec.obj(varUnit) == unit && unit.team == exec.team && !unit.isPlayer() && !(unit.controller() instanceof FormationAI)){
if(unit.controller() instanceof LogicAI la){
la.controller = exec.building(varThis);
return la;
}else{
var la = new LogicAI();