1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-23 02:42:39 +01:00

Fixed weather transition over midnight

This commit is contained in:
Daniel Evans 2013-09-08 20:43:52 +01:00
parent e8b718583b
commit d8793eefa5

View File

@ -75,7 +75,7 @@ WeatherLoader::WeatherData WeatherLoader::getWeatherData(WeatherCondition cond,
{
size_t hour = floor(tod);
const WeatherData& x = weather[static_cast<size_t>(cond)+hour];
const WeatherData& y = weather[static_cast<size_t>(cond)+hour+1];
const WeatherData& y = weather[static_cast<size_t>(cond)+(hour+1)%24];
const float a = tod - floor(tod);
WeatherData data;