mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-23 22:28:08 +07:00
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.Queue;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.blocks.Blocks;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.Units;
|
||||
import io.anuke.mindustry.entities.effect.ItemDrop;
|
||||
@ -314,6 +315,10 @@ public class Drone extends FlyingUnit implements BuilderTrait {
|
||||
if (distanceTo(target) < type.range) {
|
||||
setMineTile((Tile)target);
|
||||
}
|
||||
|
||||
if(((Tile)target).block() != Blocks.air){
|
||||
setState(drop);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user