Pull trail updating out into its own method (#5964)
This commit is contained in:
@@ -346,13 +346,7 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void update(Bullet b){
|
public void update(Bullet b){
|
||||||
if(!headless && trailLength > 0){
|
updateTrail(b);
|
||||||
if(b.trail == null){
|
|
||||||
b.trail = new Trail(trailLength);
|
|
||||||
}
|
|
||||||
b.trail.length = trailLength;
|
|
||||||
b.trail.update(b.x, b.y, trailInterp.apply(b.fin()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(homingPower > 0.0001f && b.time >= homingDelay){
|
if(homingPower > 0.0001f && b.time >= homingDelay){
|
||||||
Teamc target;
|
Teamc target;
|
||||||
@@ -387,6 +381,16 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateTrail(Bullet b){
|
||||||
|
if(!headless && trailLength > 0){
|
||||||
|
if(b.trail == null){
|
||||||
|
b.trail = new Trail(trailLength);
|
||||||
|
}
|
||||||
|
b.trail.length = trailLength;
|
||||||
|
b.trail.update(b.x, b.y, trailInterp.apply(b.fin()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
if(pierceCap >= 1){
|
if(pierceCap >= 1){
|
||||||
|
|||||||
Reference in New Issue
Block a user