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

collidesGround targetting in GroundAI (#4911)

This commit is contained in:
MEEP of Faith 2021-03-28 15:40:47 -07:00 committed by GitHub
parent c17040b1ab
commit 332b1ce100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,11 @@ public class GroundAI extends AIController{
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
target = core;
Arrays.fill(targets, core);
for(int i = 0; i < targets.length; i++){
if(unit.mounts[i].weapon.bullet.collidesGround){
targets[i] = core;
}
}
}
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){