From bf5055f944b3f2494cb251c133e5fdc73dd82f59 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 5 Sep 2018 09:44:26 -0400 Subject: [PATCH] Fixed random bullet pierce --- core/src/io/anuke/mindustry/entities/bullet/Bullet.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java index 2fcc1140a4..3f7d5663e1 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/Bullet.java +++ b/core/src/io/anuke/mindustry/entities/bullet/Bullet.java @@ -194,10 +194,8 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT if(tile == null) return false; tile = tile.target(); - if(tile.entity != null && tile.entity.collide(this) && !tile.entity.isDead() && (type.collidesTeam || tile.entity.tile.getTeam() != team)){ - if(tile.entity.getTeam() != team){ - tile.entity.collision(this); - } + if(tile.entity != null && tile.entity.collide(this) && !tile.entity.isDead() && (type.collidesTeam || tile.getTeam() != team)){ + tile.entity.collision(this); if(!supressCollision){ type.hitTile(this, tile); @@ -233,6 +231,8 @@ public class Bullet extends BulletEntity implements TeamTrait, SyncT timer.clear(); team = null; data = null; + supressCollision = false; + supressOnce = false; initialized = false; }