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:
MEEPofFaith
2022-08-19 19:05:11 -07:00
committed by GitHub
parent b9e633a10e
commit 6ca54d4f6a
5 changed files with 8 additions and 7 deletions

View File

@@ -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);
}
});