Fixed #3208
This commit is contained in:
@@ -38,7 +38,7 @@ public class Lightning{
|
|||||||
random.setSeed(seed);
|
random.setSeed(seed);
|
||||||
hit.clear();
|
hit.clear();
|
||||||
|
|
||||||
BulletType hitCreate = hitter == null ? Bullets.damageLightning : hitter.type.lightningType;
|
BulletType hitCreate = hitter == null || hitter.type.lightningType == null ? Bullets.damageLightning : hitter.type.lightningType;
|
||||||
Seq<Vec2> lines = new Seq<>();
|
Seq<Vec2> lines = new Seq<>();
|
||||||
bhit = false;
|
bhit = false;
|
||||||
|
|
||||||
|
|||||||
@@ -252,14 +252,6 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init(Bullet b){
|
public void init(Bullet b){
|
||||||
if(pierceCap >= 1){
|
|
||||||
pierce = true;
|
|
||||||
//pierceBuilding is not enabled by default, because a bullet may want to *not* pierce buildings
|
|
||||||
}
|
|
||||||
|
|
||||||
if(lightningType == null){
|
|
||||||
lightningType = !collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(killShooter && b.owner() instanceof Healthc){
|
if(killShooter && b.owner() instanceof Healthc){
|
||||||
((Healthc)b.owner()).kill();
|
((Healthc)b.owner()).kill();
|
||||||
@@ -289,6 +281,18 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(){
|
||||||
|
if(pierceCap >= 1){
|
||||||
|
pierce = true;
|
||||||
|
//pierceBuilding is not enabled by default, because a bullet may want to *not* pierce buildings
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lightningType == null){
|
||||||
|
lightningType = !collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContentType getContentType(){
|
public ContentType getContentType(){
|
||||||
return ContentType.bullet;
|
return ContentType.bullet;
|
||||||
|
|||||||
Reference in New Issue
Block a user