This commit is contained in:
Anuken
2021-01-20 09:11:32 -05:00
parent c4ea5a8256
commit f64cb3ad9a
3 changed files with 4 additions and 3 deletions

View File

@@ -1537,7 +1537,7 @@ public class Blocks implements ContentList{
shootSound = Sounds.laser; shootSound = Sounds.laser;
shootType = new LaserBulletType(140){{ shootType = new LaserBulletType(140){{
colors = new Color[]{Pal.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Pal.lancerLaser, Color.white}; colors = new Color[]{Pal.lancerLaser.cpy().a(0.4f), Pal.lancerLaser, Color.white};
hitEffect = Fx.hitLancer; hitEffect = Fx.hitLancer;
despawnEffect = Fx.none; despawnEffect = Fx.none;
hitSize = 4; hitSize = 4;

View File

@@ -189,6 +189,7 @@ public abstract class BulletType extends Content{
} }
public void hit(Bullet b, float x, float y){ public void hit(Bullet b, float x, float y){
b.hit = true;
hitEffect.at(x, y, b.rotation(), hitColor); hitEffect.at(x, y, b.rotation(), hitColor);
hitSound.at(x, y, hitSoundPitch, hitSoundVolume); hitSound.at(x, y, hitSoundPitch, hitSoundVolume);
@@ -245,7 +246,7 @@ public abstract class BulletType extends Content{
Effect.shake(despawnShake, despawnShake, b); Effect.shake(despawnShake, despawnShake, b);
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){ if(!b.hit && (fragBullet != null || splashDamageRadius > 0 || lightning > 0)){
hit(b); hit(b);
} }
} }

View File

@@ -30,7 +30,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
Object data; Object data;
BulletType type; BulletType type;
float fdata; float fdata;
transient boolean absorbed; transient boolean absorbed, hit;
@Override @Override
public void getCollisions(Cons<QuadTree> consumer){ public void getCollisions(Cons<QuadTree> consumer){