Fixed #4385
This commit is contained in:
@@ -189,6 +189,7 @@ public abstract class BulletType extends Content{
|
||||
}
|
||||
|
||||
public void hit(Bullet b, float x, float y){
|
||||
b.hit = true;
|
||||
hitEffect.at(x, y, b.rotation(), hitColor);
|
||||
hitSound.at(x, y, hitSoundPitch, hitSoundVolume);
|
||||
|
||||
@@ -245,7 +246,7 @@ public abstract class BulletType extends Content{
|
||||
|
||||
Effect.shake(despawnShake, despawnShake, b);
|
||||
|
||||
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){
|
||||
if(!b.hit && (fragBullet != null || splashDamageRadius > 0 || lightning > 0)){
|
||||
hit(b);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
||||
Object data;
|
||||
BulletType type;
|
||||
float fdata;
|
||||
transient boolean absorbed;
|
||||
transient boolean absorbed, hit;
|
||||
|
||||
@Override
|
||||
public void getCollisions(Cons<QuadTree> consumer){
|
||||
|
||||
Reference in New Issue
Block a user