mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-31 01:44:22 +07:00
Fixed #10296
This commit is contained in:
parent
8e6010ad8c
commit
b56819fcd0
@ -4518,6 +4518,7 @@ public class Blocks{
|
||||
}});
|
||||
}};
|
||||
|
||||
scaleDamageEfficiency = true;
|
||||
shootSound = Sounds.none;
|
||||
loopSoundVolume = 1f;
|
||||
loopSound = Sounds.laserbeam;
|
||||
|
@ -15,6 +15,7 @@ public class ContinuousTurret extends Turret{
|
||||
public BulletType shootType = Bullets.placeholder;
|
||||
/** Speed at which the turret can change its bullet "aim" distance. This is only used for point laser bullets. */
|
||||
public float aimChangeSpeed = Float.POSITIVE_INFINITY;
|
||||
public boolean scaleDamageEfficiency = false;
|
||||
|
||||
public ContinuousTurret(String name){
|
||||
super(name);
|
||||
@ -115,6 +116,9 @@ public class ContinuousTurret extends Turret{
|
||||
|
||||
entry.bullet.aimX = Tmp.v1.x;
|
||||
entry.bullet.aimY = Tmp.v1.y;
|
||||
if(scaleDamageEfficiency){
|
||||
entry.bullet.damage = entry.bullet.type.damage * Math.min(efficiency, 1f);
|
||||
}
|
||||
|
||||
if(isShooting() && hasAmmo()){
|
||||
entry.bullet.time = entry.bullet.lifetime * entry.bullet.type.optimalLifeFract * Math.min(shootWarmup, efficiency);
|
||||
|
Loading…
Reference in New Issue
Block a user