From 4999c257230908f73270a7c774e145fe389c37f6 Mon Sep 17 00:00:00 2001 From: Matthew Peng <54301439+MEEPofFaith@users.noreply.github.com> Date: Sun, 31 Oct 2021 10:03:19 -0700 Subject: [PATCH] Homing on healing bullets does not take collided into account (#6276) --- core/src/mindustry/entities/bullet/BulletType.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 7e515281bb..8836c6b5cd 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -359,8 +359,9 @@ public class BulletType extends Content implements Cloneable{ //home in on allies if possible if(healPercent > 0){ target = Units.closestTarget(null, b.x, b.y, homingRange, - e -> e.checkTarget(collidesAir, collidesGround) && e.team != b.team, - t -> collidesGround && (t.team != b.team || t.damaged())); + e -> e.checkTarget(collidesAir, collidesGround) && e.team != b.team && !b.hasCollided(e.id), + t -> collidesGround && (t.team != b.team || t.damaged()) && !b.hasCollided(t.id) + ); }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)); }