Bullet pierceCap fix + Malis + Other fixes
This commit is contained in:
@@ -44,6 +44,10 @@ public class BulletType extends Content implements Cloneable{
|
||||
public boolean pierceBuilding;
|
||||
/** Maximum # of pierced objects. */
|
||||
public int pierceCap = -1;
|
||||
/** If false, this bullet isn't removed after pierceCap is exceeded. Expert usage only. */
|
||||
public boolean removeAfterPierce = true;
|
||||
/** For piercing lasers, setting this to true makes it get absorbed by plastanium walls. */
|
||||
public boolean laserAbsorb = true;
|
||||
/** Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. */
|
||||
public float optimalLifeFract = 0f;
|
||||
/** Z layer to drawn on. */
|
||||
|
||||
@@ -11,11 +11,10 @@ public class ContinuousBulletType extends BulletType{
|
||||
public float damageInterval = 5f;
|
||||
public boolean largeHit = false;
|
||||
public boolean continuous = true;
|
||||
public boolean laserAbsorb = true;
|
||||
/** can't use pierceCap here for... many reasons. DO NOT USE, BUGGY */
|
||||
public int pierceMax = -1;
|
||||
|
||||
{
|
||||
removeAfterPierce = false;
|
||||
pierceCap = -1;
|
||||
speed = 0f;
|
||||
despawnEffect = Fx.none;
|
||||
shootEffect = Fx.none;
|
||||
@@ -78,7 +77,7 @@ public class ContinuousBulletType extends BulletType{
|
||||
}
|
||||
|
||||
public void applyDamage(Bullet b){
|
||||
Damage.collideLine(b, b.team, hitEffect, b.x, b.y, b.rotation(), currentLength(b), largeHit, laserAbsorb, pierceMax);
|
||||
Damage.collideLine(b, b.team, hitEffect, b.x, b.y, b.rotation(), currentLength(b), largeHit, laserAbsorb, pierceCap);
|
||||
}
|
||||
|
||||
public float currentLength(Bullet b){
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ContinuousFlameBulletType extends ContinuousBulletType{
|
||||
@Override
|
||||
public void draw(Bullet b){
|
||||
float mult = b.fin(lengthInterp);
|
||||
float realLength = (pierceMax <= 0 ? length : Damage.findPierceLength(b, pierceMax, length)) * mult;
|
||||
float realLength = (pierceCap <= 0 ? length : Damage.findPierceLength(b, pierceCap, length)) * mult;
|
||||
|
||||
float sin = Mathf.sin(Time.time, oscScl, oscMag);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class LaserBulletType extends BulletType{
|
||||
|
||||
@Override
|
||||
public void init(Bullet b){
|
||||
float resultLength = Damage.collideLaser(b, length, largeHit), rot = b.rotation();
|
||||
float resultLength = Damage.collideLaser(b, length, largeHit, laserAbsorb, pierceCap), rot = b.rotation();
|
||||
|
||||
laserEffect.at(b.x, b.y, rot, resultLength * 0.75f);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ShrapnelBulletType extends BulletType{
|
||||
public void init(Bullet b){
|
||||
super.init(b);
|
||||
|
||||
Damage.collideLaser(b, length, hitLarge);
|
||||
Damage.collideLaser(b, length, hitLarge, laserAbsorb, pierceCap);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user