Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
This commit is contained in:
@@ -131,6 +131,9 @@ public class BulletType extends Content implements Cloneable{
|
||||
public boolean pierceArmor = false;
|
||||
|
||||
//additional effects
|
||||
|
||||
/** Whether status and despawnHit should automatically be set. */
|
||||
public boolean setDefaults = true;
|
||||
|
||||
public float fragCone = 360f;
|
||||
public float fragAngle = 0f;
|
||||
@@ -428,9 +431,15 @@ public class BulletType extends Content implements Cloneable{
|
||||
//pierceBuilding is not enabled by default, because a bullet may want to *not* pierce buildings
|
||||
}
|
||||
|
||||
if(lightning > 0){
|
||||
if(status == StatusEffects.none){
|
||||
status = StatusEffects.shocked;
|
||||
if(setDefaults){
|
||||
if(lightning > 0){
|
||||
if(status == StatusEffects.none){
|
||||
status = StatusEffects.shocked;
|
||||
}
|
||||
}
|
||||
|
||||
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){
|
||||
despawnHit = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,13 +447,10 @@ public class BulletType extends Content implements Cloneable{
|
||||
lightningType = !collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
||||
}
|
||||
|
||||
if(fragBullet != null || splashDamageRadius > 0 || lightning > 0){
|
||||
despawnHit = true;
|
||||
}
|
||||
|
||||
if(lightRadius == -1){
|
||||
if(lightRadius <= -1){
|
||||
lightRadius = Math.max(18, hitSize * 5f);
|
||||
}
|
||||
|
||||
drawSize = Math.max(drawSize, trailLength * speed * 2f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user