From e05ac5ae41fb5b2e925a84d5781b4daab6859a11 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 8 Oct 2020 13:08:49 -0400 Subject: [PATCH] Cleanup --- core/src/mindustry/entities/bullet/BulletType.java | 2 +- core/src/mindustry/entities/comp/BulletComp.java | 8 +------- core/src/mindustry/entities/comp/DamageComp.java | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 71414c3745..ee7278fa6a 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -311,7 +311,7 @@ public abstract class BulletType extends Content{ bullet.data = data; bullet.drag = drag; bullet.hitSize = hitSize; - bullet.damage = damage < 0 ? this.damage : damage; + bullet.damage = (damage < 0 ? this.damage : damage) * bullet.damageMultiplier(); bullet.add(); if(keepVelocity && owner instanceof Velc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y); diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index 00640b4603..ac831ef507 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -19,12 +19,11 @@ import static mindustry.Vars.*; abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{ @Import Team team; @Import Entityc owner; - @Import float x,y; + @Import float x, y, damage; IntSeq collided = new IntSeq(6); Object data; BulletType type; - float damage; float fdata; @Override @@ -76,11 +75,6 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw return type.drawSize; } - @Override - public float damage(){ - return damage * damageMultiplier(); - } - @Replace @Override public boolean collides(Hitboxc other){ diff --git a/core/src/mindustry/entities/comp/DamageComp.java b/core/src/mindustry/entities/comp/DamageComp.java index e46a7ec87c..d9b6105352 100644 --- a/core/src/mindustry/entities/comp/DamageComp.java +++ b/core/src/mindustry/entities/comp/DamageComp.java @@ -4,5 +4,5 @@ import mindustry.annotations.Annotations.*; @Component abstract class DamageComp{ - abstract float damage(); + float damage; }