mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Fixed #6182
This commit is contained in:
parent
be1561b0cb
commit
e6d7330f6e
1 changed files with 1 additions and 1 deletions
|
|
@ -335,7 +335,7 @@ public class LExecutor{
|
|||
/** Checks is a unit is valid for logic AI control, and returns the controller. */
|
||||
@Nullable
|
||||
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(unitObj instanceof Unit unit && unit.isValid() && 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue