prevent from breaking other things
This commit is contained in:
@@ -25,7 +25,7 @@ public abstract class BulletType extends Content{
|
|||||||
public float drawSize = 40f;
|
public float drawSize = 40f;
|
||||||
public float drag = 0f;
|
public float drag = 0f;
|
||||||
public boolean pierce, pierceBuilding;
|
public boolean pierce, pierceBuilding;
|
||||||
public int pierceCap = 1;
|
public int pierceCap = -1;
|
||||||
public Effect hitEffect, despawnEffect;
|
public Effect hitEffect, despawnEffect;
|
||||||
|
|
||||||
/** Effect created when shooting. */
|
/** Effect created when shooting. */
|
||||||
@@ -236,7 +236,7 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init(Bullet b){
|
public void init(Bullet b){
|
||||||
if(pierceCap > 1) {
|
if(pierceCap >= 1) {
|
||||||
pierce = true;
|
pierce = true;
|
||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(collided.size >= type.pierceCap) {
|
if(type.pierceCap != -1 && collided.size >= type.pierceCap) {
|
||||||
remove();
|
remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user