mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 09:45:32 +00:00
Removed duplicate functions and moved pause check in weather.cpp
This commit is contained in:
parent
782e851eb1
commit
470d375177
4 changed files with 44 additions and 52 deletions
|
@ -348,11 +348,6 @@ void WeatherManager::transition(float factor)
|
||||||
mResult.mRainFrequency = current.mRainFrequency;
|
mResult.mRainFrequency = current.mRainFrequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WeatherManager::update(float duration)
|
|
||||||
{
|
|
||||||
this->update(duration, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WeatherManager::update(float duration, bool paused)
|
void WeatherManager::update(float duration, bool paused)
|
||||||
{
|
{
|
||||||
float timePassed = mTimePassed;
|
float timePassed = mTimePassed;
|
||||||
|
@ -488,7 +483,9 @@ void WeatherManager::update(float duration, bool paused)
|
||||||
mRendering->getSkyManager()->secundaDisable();
|
mRendering->getSkyManager()->secundaDisable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCurrentWeather == "thunderstorm" && mNextWeather == "" && !paused)
|
if (!paused)
|
||||||
|
{
|
||||||
|
if (mCurrentWeather == "thunderstorm" && mNextWeather == "")
|
||||||
{
|
{
|
||||||
if (mThunderFlash > 0)
|
if (mThunderFlash > 0)
|
||||||
{
|
{
|
||||||
|
@ -534,6 +531,8 @@ void WeatherManager::update(float duration, bool paused)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mRendering->getSkyManager()->setLightningStrength(0.f);
|
mRendering->getSkyManager()->setLightningStrength(0.f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
mRendering->setAmbientColour(mResult.mAmbientColor);
|
mRendering->setAmbientColour(mResult.mAmbientColor);
|
||||||
mRendering->sunEnable(false);
|
mRendering->sunEnable(false);
|
||||||
|
|
|
@ -169,9 +169,9 @@ namespace MWWorld
|
||||||
/**
|
/**
|
||||||
* Per-frame update
|
* Per-frame update
|
||||||
* @param duration
|
* @param duration
|
||||||
|
* @param paused
|
||||||
*/
|
*/
|
||||||
void update(float duration);
|
void update(float duration, bool paused = false);
|
||||||
void update(float duration, bool paused);
|
|
||||||
|
|
||||||
void stopSounds(bool stopAll);
|
void stopSounds(bool stopAll);
|
||||||
|
|
||||||
|
|
|
@ -2635,12 +2635,6 @@ namespace MWWorld
|
||||||
action.execute(ptr);
|
action.execute(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::updateWeather(float duration)
|
|
||||||
{
|
|
||||||
// Implement original behavior:
|
|
||||||
this->updateWeather(duration, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void World::updateWeather(float duration, bool paused)
|
void World::updateWeather(float duration, bool paused)
|
||||||
{
|
{
|
||||||
if (mPlayer->wasTeleported())
|
if (mPlayer->wasTeleported())
|
||||||
|
|
|
@ -99,8 +99,7 @@ namespace MWWorld
|
||||||
|
|
||||||
std::string mStartCell;
|
std::string mStartCell;
|
||||||
|
|
||||||
void updateWeather(float duration);
|
void updateWeather(float duration, bool paused = false);
|
||||||
void updateWeather(float duration, bool paused);
|
|
||||||
int getDaysPerMonth (int month) const;
|
int getDaysPerMonth (int month) const;
|
||||||
|
|
||||||
void rotateObjectImp (const Ptr& ptr, Ogre::Vector3 rot, bool adjust);
|
void rotateObjectImp (const Ptr& ptr, Ogre::Vector3 rot, bool adjust);
|
||||||
|
|
Loading…
Reference in a new issue