mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-22 04:14:04 +00:00
Better fix, now allows for teleporting to change weather while still paused.
This commit is contained in:
parent
3dee4c2b0e
commit
782e851eb1
4 changed files with 17 additions and 6 deletions
|
@ -349,6 +349,11 @@ void WeatherManager::transition(float factor)
|
||||||
}
|
}
|
||||||
|
|
||||||
void WeatherManager::update(float duration)
|
void WeatherManager::update(float duration)
|
||||||
|
{
|
||||||
|
this->update(duration, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WeatherManager::update(float duration, bool paused)
|
||||||
{
|
{
|
||||||
float timePassed = mTimePassed;
|
float timePassed = mTimePassed;
|
||||||
mTimePassed = 0;
|
mTimePassed = 0;
|
||||||
|
@ -483,7 +488,7 @@ void WeatherManager::update(float duration)
|
||||||
mRendering->getSkyManager()->secundaDisable();
|
mRendering->getSkyManager()->secundaDisable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCurrentWeather == "thunderstorm" && mNextWeather == "")
|
if (mCurrentWeather == "thunderstorm" && mNextWeather == "" && !paused)
|
||||||
{
|
{
|
||||||
if (mThunderFlash > 0)
|
if (mThunderFlash > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -171,6 +171,7 @@ namespace MWWorld
|
||||||
* @param duration
|
* @param duration
|
||||||
*/
|
*/
|
||||||
void update(float duration);
|
void update(float duration);
|
||||||
|
void update(float duration, bool paused);
|
||||||
|
|
||||||
void stopSounds(bool stopAll);
|
void stopSounds(bool stopAll);
|
||||||
|
|
||||||
|
|
|
@ -1489,12 +1489,10 @@ namespace MWWorld
|
||||||
if (mGoToJail && !paused)
|
if (mGoToJail && !paused)
|
||||||
goToJail();
|
goToJail();
|
||||||
|
|
||||||
|
updateWeather(duration, paused);
|
||||||
|
|
||||||
if (!paused)
|
if (!paused)
|
||||||
{
|
|
||||||
updateWeather(duration);
|
|
||||||
doPhysics (duration);
|
doPhysics (duration);
|
||||||
}
|
|
||||||
|
|
||||||
mWorldScene->update (duration, paused);
|
mWorldScene->update (duration, paused);
|
||||||
|
|
||||||
|
@ -2638,6 +2636,12 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::updateWeather(float duration)
|
void World::updateWeather(float duration)
|
||||||
|
{
|
||||||
|
// Implement original behavior:
|
||||||
|
this->updateWeather(duration, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void World::updateWeather(float duration, bool paused)
|
||||||
{
|
{
|
||||||
if (mPlayer->wasTeleported())
|
if (mPlayer->wasTeleported())
|
||||||
{
|
{
|
||||||
|
@ -2645,7 +2649,7 @@ namespace MWWorld
|
||||||
mWeatherManager->switchToNextWeather(true);
|
mWeatherManager->switchToNextWeather(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mWeatherManager->update(duration);
|
mWeatherManager->update(duration, paused);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct AddDetectedReference
|
struct AddDetectedReference
|
||||||
|
|
|
@ -100,6 +100,7 @@ namespace MWWorld
|
||||||
std::string mStartCell;
|
std::string mStartCell;
|
||||||
|
|
||||||
void updateWeather(float duration);
|
void updateWeather(float duration);
|
||||||
|
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