|
|
|
@ -132,7 +132,7 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
|
|
|
|
|
// build current weather state
|
|
|
|
|
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
|
|
|
|
|
//
|
|
|
|
|
manualUpdate(day, hour, wc, weatherValue, season);
|
|
|
|
|
manualUpdateImpl(day, hour, wc, weatherValue, season);
|
|
|
|
|
_LastEvalHour = hour;
|
|
|
|
|
_LastEvalDay = day;
|
|
|
|
|
}
|
|
|
|
@ -147,25 +147,29 @@ void CWeatherManagerClient::update(uint64 day, float hour, const CWeatherContext
|
|
|
|
|
// build current weather state
|
|
|
|
|
EGSPD::CSeason::TSeason season = CRyzomTime::getSeasonByDay((uint32)day);
|
|
|
|
|
//
|
|
|
|
|
manualUpdate(day, hour, wc, weatherValue, season, camMat, continent);
|
|
|
|
|
manualUpdateImpl(day, hour, wc, weatherValue, season, camMat, continent);
|
|
|
|
|
_LastEvalHour = hour;
|
|
|
|
|
_LastEvalDay = day;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
|
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
|
|
|
|
|
{
|
|
|
|
|
manualUpdateImpl(day, hour, wc, weatherValue, season, camMat, continent);
|
|
|
|
|
_LastEvalHour = hour;
|
|
|
|
|
_LastEvalDay = day;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
|
void CWeatherManagerClient::manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season, const NLMISC::CMatrix &camMat, const CContinent &continent)
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_USE(RZ_WeatherManagerClient)
|
|
|
|
|
if (!wc.WF) return;
|
|
|
|
|
manualUpdate(day, hour, wc, weatherValue, season);
|
|
|
|
|
manualUpdateImpl(day, hour, wc, weatherValue, season);
|
|
|
|
|
setupFXs(camMat, wc.GR, continent);
|
|
|
|
|
setupWind(&(wc.WF[season]));
|
|
|
|
|
float scaledWeatherValue = weatherValue * (wc.WF[season].getNumWeatherSetups() - 1);
|
|
|
|
|
updateThunder(day, hour, wc, true, scaledWeatherValue, season);
|
|
|
|
|
_LastEvalHour = hour;
|
|
|
|
|
_LastEvalDay = day;
|
|
|
|
|
|
|
|
|
|
// Sound stuff
|
|
|
|
|
if (SoundMngr != 0)
|
|
|
|
@ -250,9 +254,16 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
|
void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
|
|
|
|
|
{
|
|
|
|
|
manualUpdateImpl(day, hour, wc, weatherValue, season);
|
|
|
|
|
_LastEvalHour = hour;
|
|
|
|
|
_LastEvalDay = day;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
|
void CWeatherManagerClient::manualUpdateImpl(uint64 day, float hour, const CWeatherContext &wc, float weatherValue, EGSPD::CSeason::TSeason season)
|
|
|
|
|
{
|
|
|
|
|
H_AUTO_USE(RZ_WeatherManagerClient)
|
|
|
|
|
if (!wc.WF) return;
|
|
|
|
@ -269,11 +280,8 @@ void CWeatherManagerClient::manualUpdate(uint64 day, float hour, const CWeatherC
|
|
|
|
|
// blend client specific part
|
|
|
|
|
CWeatherStateClient::blend(_CurrWeatherStateClient, safe_cast<const CWeatherSetupClient *>(floorSetup)->WeatherStateClient, safe_cast<const CWeatherSetupClient *>(ceilSetup)->WeatherStateClient, blendFactor);
|
|
|
|
|
}
|
|
|
|
|
_LastEvalHour = hour;
|
|
|
|
|
_LastEvalDay = day;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
|
void CWeatherManagerClient::setupWind(const CWeatherFunction *wf)
|
|
|
|
|
{
|
|
|
|
|