Fix more things that hit non-hittable units (#7408)

* hittable check for EMP

* hittable check for Damage#status

* why push if don't get hit
This commit is contained in:
MEEPofFaith
2022-08-21 14:09:47 -07:00
committed by GitHub
parent dde9f895cf
commit 11e3f85242
3 changed files with 3 additions and 3 deletions

View File

@@ -470,7 +470,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f) * dragMultiplier * state.rules.dragMultiplier;
//apply knockback based on spawns
if(team != state.rules.waveTeam && state.hasSpawns() && (!net.client() || isLocal())){
if(team != state.rules.waveTeam && state.hasSpawns() && (!net.client() || isLocal()) && hittable()){
float relativeSize = state.rules.dropZoneRadius + hitSize/2f + 1f;
for(Tile spawn : spawner.getSpawns()){
if(within(spawn.worldx(), spawn.worldy(), relativeSize)){