Cleanup
This commit is contained in:
@@ -311,7 +311,7 @@ public abstract class BulletType extends Content{
|
|||||||
bullet.data = data;
|
bullet.data = data;
|
||||||
bullet.drag = drag;
|
bullet.drag = drag;
|
||||||
bullet.hitSize = hitSize;
|
bullet.hitSize = hitSize;
|
||||||
bullet.damage = damage < 0 ? this.damage : damage;
|
bullet.damage = (damage < 0 ? this.damage : damage) * bullet.damageMultiplier();
|
||||||
bullet.add();
|
bullet.add();
|
||||||
|
|
||||||
if(keepVelocity && owner instanceof Velc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y);
|
if(keepVelocity && owner instanceof Velc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y);
|
||||||
|
|||||||
@@ -19,12 +19,11 @@ import static mindustry.Vars.*;
|
|||||||
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
|
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
|
||||||
@Import Team team;
|
@Import Team team;
|
||||||
@Import Entityc owner;
|
@Import Entityc owner;
|
||||||
@Import float x,y;
|
@Import float x, y, damage;
|
||||||
|
|
||||||
IntSeq collided = new IntSeq(6);
|
IntSeq collided = new IntSeq(6);
|
||||||
Object data;
|
Object data;
|
||||||
BulletType type;
|
BulletType type;
|
||||||
float damage;
|
|
||||||
float fdata;
|
float fdata;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -76,11 +75,6 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||||||
return type.drawSize;
|
return type.drawSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float damage(){
|
|
||||||
return damage * damageMultiplier();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Replace
|
@Replace
|
||||||
@Override
|
@Override
|
||||||
public boolean collides(Hitboxc other){
|
public boolean collides(Hitboxc other){
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ import mindustry.annotations.Annotations.*;
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
abstract class DamageComp{
|
abstract class DamageComp{
|
||||||
abstract float damage();
|
float damage;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user