Homing on healing bullets does not take collided into account (#6276)
This commit is contained in:
@@ -359,8 +359,9 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
//home in on allies if possible
|
//home in on allies if possible
|
||||||
if(healPercent > 0){
|
if(healPercent > 0){
|
||||||
target = Units.closestTarget(null, b.x, b.y, homingRange,
|
target = Units.closestTarget(null, b.x, b.y, homingRange,
|
||||||
e -> e.checkTarget(collidesAir, collidesGround) && e.team != b.team,
|
e -> e.checkTarget(collidesAir, collidesGround) && e.team != b.team && !b.hasCollided(e.id),
|
||||||
t -> collidesGround && (t.team != b.team || t.damaged()));
|
t -> collidesGround && (t.team != b.team || t.damaged()) && !b.hasCollided(t.id)
|
||||||
|
);
|
||||||
}else{
|
}else{
|
||||||
target = Units.closestTarget(b.team, b.x, b.y, homingRange, e -> e.checkTarget(collidesAir, collidesGround) && !b.hasCollided(e.id), t -> collidesGround && !b.hasCollided(t.id));
|
target = Units.closestTarget(b.team, b.x, b.y, homingRange, e -> e.checkTarget(collidesAir, collidesGround) && !b.hasCollided(e.id), t -> collidesGround && !b.hasCollided(t.id));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user