Better fix, now allows for teleporting to change weather while still paused.

deque
Internecine 10 years ago
parent 3dee4c2b0e
commit 782e851eb1

@ -349,6 +349,11 @@ void WeatherManager::transition(float factor)
}
void WeatherManager::update(float duration)
{
this->update(duration, false);
}
void WeatherManager::update(float duration, bool paused)
{
float timePassed = mTimePassed;
mTimePassed = 0;
@ -483,7 +488,7 @@ void WeatherManager::update(float duration)
mRendering->getSkyManager()->secundaDisable();
}
if (mCurrentWeather == "thunderstorm" && mNextWeather == "")
if (mCurrentWeather == "thunderstorm" && mNextWeather == "" && !paused)
{
if (mThunderFlash > 0)
{

@ -171,6 +171,7 @@ namespace MWWorld
* @param duration
*/
void update(float duration);
void update(float duration, bool paused);
void stopSounds(bool stopAll);

@ -1489,12 +1489,10 @@ namespace MWWorld
if (mGoToJail && !paused)
goToJail();
updateWeather(duration, paused);
if (!paused)
{
updateWeather(duration);
doPhysics (duration);
}
mWorldScene->update (duration, paused);
@ -2638,14 +2636,20 @@ namespace MWWorld
}
void World::updateWeather(float duration)
{
// Implement original behavior:
this->updateWeather(duration, false);
}
void World::updateWeather(float duration, bool paused)
{
if (mPlayer->wasTeleported())
{
mPlayer->setTeleported(false);
mWeatherManager->switchToNextWeather(true);
}
mWeatherManager->update(duration);
mWeatherManager->update(duration, paused);
}
struct AddDetectedReference

@ -100,6 +100,7 @@ namespace MWWorld
std::string mStartCell;
void updateWeather(float duration);
void updateWeather(float duration, bool paused);
int getDaysPerMonth (int month) const;
void rotateObjectImp (const Ptr& ptr, Ogre::Vector3 rot, bool adjust);

Loading…
Cancel
Save