Move damageMultiplier to BulletType (#7436)

* Move bullet damage multiplier to bulletType

* Is this better?

I don't know much about optimization, is this any better than before?

* Revert "Is this better?"

This reverts commit b83723701f.
This commit is contained in:
MEEPofFaith
2022-08-24 10:48:06 -07:00
committed by GitHub
parent 3f4ae7fed3
commit 7ac00d0aaf
2 changed files with 8 additions and 4 deletions

View File

@@ -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