Fix possible sync loss on seasonal temperature change.

shapetextures
Sven Eberhardt 2015-09-19 13:37:29 -04:00
parent 6d226e30ed
commit 3f100cffb0
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ void C4Weather::Execute()
// Temperature
if (!::Game.iTick35)
{
int32_t iTemperature=Climate-(int32_t)(TemperatureRange*cos(6.28*(float)Season/100.0));
int32_t iTemperature = Climate - fixtoi(Cos(itofix(36 * Season, 10)), TemperatureRange);
if (Temperature<iTemperature) Temperature++;
else if (Temperature>iTemperature) Temperature--;
}