Fixed random bullet pierce
This commit is contained in:
@@ -194,10 +194,8 @@ public class Bullet extends BulletEntity<BulletType> implements TeamTrait, SyncT
|
|||||||
if(tile == null) return false;
|
if(tile == null) return false;
|
||||||
tile = tile.target();
|
tile = tile.target();
|
||||||
|
|
||||||
if(tile.entity != null && tile.entity.collide(this) && !tile.entity.isDead() && (type.collidesTeam || tile.entity.tile.getTeam() != team)){
|
if(tile.entity != null && tile.entity.collide(this) && !tile.entity.isDead() && (type.collidesTeam || tile.getTeam() != team)){
|
||||||
if(tile.entity.getTeam() != team){
|
tile.entity.collision(this);
|
||||||
tile.entity.collision(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!supressCollision){
|
if(!supressCollision){
|
||||||
type.hitTile(this, tile);
|
type.hitTile(this, tile);
|
||||||
@@ -233,6 +231,8 @@ public class Bullet extends BulletEntity<BulletType> implements TeamTrait, SyncT
|
|||||||
timer.clear();
|
timer.clear();
|
||||||
team = null;
|
team = null;
|
||||||
data = null;
|
data = null;
|
||||||
|
supressCollision = false;
|
||||||
|
supressOnce = false;
|
||||||
initialized = false;
|
initialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user