diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 28bb749951..9a43f5a001 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -364,6 +364,13 @@ public class BulletType extends Content implements Cloneable{ } } + public float damageMultiplier(Bullet b){ + if(b.owner instanceof Unit u) return u.damageMultiplier() * state.rules.unitDamage(b.team); + if(b.owner instanceof Building) return state.rules.blockDamage(b.team); + + return 1f; + } + public void hit(Bullet b){ hit(b, b.x, b.y); } diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index 813b3979f0..32375d2ef7 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -82,10 +82,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw @Override public float damageMultiplier(){ - if(owner instanceof Unit u) return u.damageMultiplier() * state.rules.unitDamage(team); - if(owner instanceof Building) return state.rules.blockDamage(team); - - return 1f; + return type.damageMultiplier(self()); } @Override