mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-10 15:57:37 +07:00
collidesGround
targetting in GroundAI
(#4911)
This commit is contained in:
@ -21,7 +21,11 @@ public class GroundAI extends AIController{
|
|||||||
|
|
||||||
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
|
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
|
||||||
target = core;
|
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){
|
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){
|
||||||
|
Reference in New Issue
Block a user