Fix efficiency penalty incorrectly applied to large gas+plasma turbines

This is a copy-paste error from the original code in the large steam
turbine. `aOptFlow` is the optimal flow rate expressed in EU/t, while
`totalFlow` is expressed in fuel L/t
This commit is contained in:
David Vierra 2016-11-29 14:21:15 -10:00 committed by Blood-Asp
parent f98ce7ef08
commit dcf348a7e1
2 changed files with 2 additions and 2 deletions

View file

@ -112,7 +112,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
if (totalFlow != actualOptimalFlow) { if (totalFlow != actualOptimalFlow) {
float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow));
if(totalFlow>aOptFlow){efficiency = 1.0f;} if(totalFlow>actualOptimalFlow){efficiency = 1.0f;}
if (efficiency < 0) if (efficiency < 0)
efficiency = 0; // Can happen with really ludicrously poor inefficiency. efficiency = 0; // Can happen with really ludicrously poor inefficiency.
tEU *= efficiency; tEU *= efficiency;

View file

@ -127,7 +127,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
if (totalFlow != actualOptimalFlow) { if (totalFlow != actualOptimalFlow) {
float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow));
if(totalFlow>aOptFlow){efficiency = 1.0f;} if(totalFlow>actualOptimalFlow){efficiency = 1.0f;}
if (efficiency < 0) if (efficiency < 0)
efficiency = 0; // Can happen with really ludicrously poor inefficiency. efficiency = 0; // Can happen with really ludicrously poor inefficiency.
tEU *= efficiency; tEU *= efficiency;