Fixed #7198
This commit is contained in:
@@ -166,9 +166,8 @@ public class RepairBeamWeapon extends Weapon{
|
|||||||
float
|
float
|
||||||
weaponRotation = unit.rotation - 90,
|
weaponRotation = unit.rotation - 90,
|
||||||
wx = unit.x + Angles.trnsx(weaponRotation, x, y),
|
wx = unit.x + Angles.trnsx(weaponRotation, x, y),
|
||||||
wy = unit.y + Angles.trnsy(weaponRotation, x, y);
|
wy = unit.y + Angles.trnsy(weaponRotation, x, y),
|
||||||
|
z = Draw.z();
|
||||||
float z = Draw.z();
|
|
||||||
RepairTurret.drawBeam(wx, wy, unit.rotation + mount.rotation, shootY, unit.id, mount.target == null || controllable ? null : (Sized)mount.target, unit.team, heal.strength,
|
RepairTurret.drawBeam(wx, wy, unit.rotation + mount.rotation, shootY, unit.id, mount.target == null || controllable ? null : (Sized)mount.target, unit.team, heal.strength,
|
||||||
pulseStroke, pulseRadius, beamWidth + Mathf.absin(widthSinScl, widthSinMag), heal.lastEnd, heal.offset, laserColor, laserTopColor,
|
pulseStroke, pulseRadius, beamWidth + Mathf.absin(widthSinScl, widthSinMag), heal.lastEnd, heal.offset, laserColor, laserTopColor,
|
||||||
laser, laserEnd, laserTop, laserTopEnd);
|
laser, laserEnd, laserTop, laserTopEnd);
|
||||||
|
|||||||
@@ -358,12 +358,17 @@ public class PowerGraph{
|
|||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private boolean otherConsumersAreValid(Building build, Consume consumePower){
|
private boolean otherConsumersAreValid(Building build, Consume consumePower){
|
||||||
|
float f = build.efficiency;
|
||||||
|
//hack so liquids output positive efficiency values
|
||||||
|
build.efficiency = 1f;
|
||||||
for(Consume cons : build.block.nonOptionalConsumers){
|
for(Consume cons : build.block.nonOptionalConsumers){
|
||||||
//TODO fix this properly
|
//TODO fix this properly
|
||||||
if(cons != consumePower && cons.efficiency(build) <= 0.0000001f){
|
if(cons != consumePower && cons.efficiency(build) <= 0.0000001f){
|
||||||
|
build.efficiency = f;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
build.efficiency = f;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user