Fix units that can't be hit being hit by some things. (#7391)
* Hittable check in checkTarget * Remove hittable() and checkTarget() overlap * Make PointBulletType abide collision types There should probably be a thing for jsonable `buildingFilter`s, in the case that you want something that doesn't target blocks. * PointBulletTypes should not be reflectable * oop * Use targettable instead of hittable * targetable check for Damage#linecast * targetable check for defenderAI * I shot, and then I hit something, but it was some invisible thing in the way, so I guess I missed
This commit is contained in:
@@ -101,7 +101,7 @@ public class EnergyFieldAbility extends Ability{
|
||||
|
||||
if(hitUnits){
|
||||
Units.nearby(null, rx, ry, range, other -> {
|
||||
if(other != unit && (other.isFlying() ? targetAir : targetGround)){
|
||||
if(other != unit && other.checkTarget(targetAir, targetGround) && other.targetable(unit.team)){
|
||||
all.add(other);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user