mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Crash fix
This commit is contained in:
parent
42ce453f11
commit
fc5e40a857
@ -174,7 +174,7 @@ public class RtsAI{
|
||||
|
||||
//defend when close, or this is the only squad defending
|
||||
//TODO will always rush to defense no matter what
|
||||
if(best instanceof CoreBuild || units.size >= data.team.rules().rtsMinSquad || best.within(ax, ay, 500f)){
|
||||
if(best != null && (best instanceof CoreBuild || units.size >= data.team.rules().rtsMinSquad || best.within(ax, ay, 500f))){
|
||||
defend = best;
|
||||
|
||||
if(debug){
|
||||
|
Loading…
Reference in New Issue
Block a user