Here's a real head-scratcher. In Engines.class, method update(), we have the following. On line 3 the air temp is assigned to variable f1. Farther down are checks for TOilOut, TOilIn and TWaterOut, and if any are less than the air temp they are set to equal the air temp.
Yet we have these temps all starting at 0C, even on hot days, slowly rising to the air temp--or rising more quickly once the engine is started.
I don't get it. Method update() is always active from mission start.
public void update(float f, FlightModel flightmodel)
{
float f5 = Pitot.Indicator((float)flightmodel.Loc.z, flightmodel.getSpeedKMH());
boolean flag = true;
float f1 = Atmosphere.temperature((float)flightmodel.Loc.z) - 273.15F;
if(stage == 6)
{
float f2 = 1.05F * (float)Math.sqrt(Math.sqrt(getPower() <= 0.2F ? 0.2F : getPower() + (float)flightmodel.AS.astateOilStates[0] * 0.33F)) * (float)Math.sqrt(Wx / W0 <= 0.75F ? 0.75D : Wx / W0) * tOilOutMaxRPM * (flag ? 0.9F : 1.0F) * (1.0F - f5 * 0.0002F) + 22F;
if(getPower() > 1.0F)
f2 *= getPower();
TOilOut += (f2 - TOilOut) * f * tChangeSpeed;
} else
{
float f3 = (Wx / W0) * tOilOutMaxRPM * (flag ? 0.8F : 1.0F) + f1;
TOilOut += (f3 - TOilOut) * f * tChangeSpeed * (bInline ? 0.42F : 1.07F);
}
float f4;
if(flag)
f4 = TOilOut * (0.75F - f5 * 0.0005F) + f1 * (0.25F + f5 * 0.0005F);
else
f4 = TOilOut * (0.8F - f5 * 0.0005F) + f1 * (0.2F + f5 * 0.0005F);
TOilIn += (f4 - TOilIn) * f * tChangeSpeed * 0.5F;
f4 = 1.05F * (float)Math.sqrt(getPower()) * (1.0F - f5 * 0.0002F) * tWaterMaxRPM + f1;
TWaterOut += (f4 - TWaterOut) * f * tChangeSpeed * (TWaterOut >= 50F ? 1.0F : 0.4F) * (1.0F - f5 * 0.0006F);
if(TOilOut < f1)
TOilOut = f1;
if(TOilIn < f1)
TOilIn = f1;
if(TWaterOut < f1)
TWaterOut = f1;
if(World.cur().diffCur.Engine_Overheat && (TWaterOut > tWaterCritMax || TOilOut > tOilCritMax))
{
if(heatStringID == -1)
heatStringID = HUD.makeIdLog();
HUD.log(heatStringID, "EngineOverheat");
timeCounter += f;
if(timeCounter > timeOverheat)
{
for(int i = 0; i < Power.length; i++)
if(Power[i] > 0.33F)
{
Power[i] -= 0.00666F * f;
tOilCritMax -= 0.00666F * f * (tOilCritMax - tOilOutMaxRPM);
} else
{
Power[i] = 0.33F;
stage = 7;
}
}
} else
if(timeCounter > 0.0F)
{
timeCounter = 0.0F;
if(heatStringID == -1)
heatStringID = HUD.makeIdLog();
HUD.log(heatStringID, "EngineRestored");
}
}