Fixed a bug in drone AI
This commit is contained in:
@@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.Color;
|
|||||||
import com.badlogic.gdx.utils.ObjectSet;
|
import com.badlogic.gdx.utils.ObjectSet;
|
||||||
import com.badlogic.gdx.utils.Queue;
|
import com.badlogic.gdx.utils.Queue;
|
||||||
import io.anuke.mindustry.content.Items;
|
import io.anuke.mindustry.content.Items;
|
||||||
|
import io.anuke.mindustry.content.blocks.Blocks;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.entities.effect.ItemDrop;
|
import io.anuke.mindustry.entities.effect.ItemDrop;
|
||||||
@@ -314,6 +315,10 @@ public class Drone extends FlyingUnit implements BuilderTrait {
|
|||||||
if (distanceTo(target) < type.range) {
|
if (distanceTo(target) < type.range) {
|
||||||
setMineTile((Tile)target);
|
setMineTile((Tile)target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(((Tile)target).block() != Blocks.air){
|
||||||
|
setState(drop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user