mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-05 16:37:38 +07:00
collidesGround
targetting in GroundAI
(#4911)
This commit is contained in:
parent
c17040b1ab
commit
332b1ce100
@ -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){
|
||||||
|
Loading…
Reference in New Issue
Block a user