Merge remote-tracking branch 'internecine/master'

deque
Marc Zinnschlag 10 years ago
commit 528dcf761d

@ -348,7 +348,7 @@ void WeatherManager::transition(float factor)
mResult.mRainFrequency = current.mRainFrequency; mResult.mRainFrequency = current.mRainFrequency;
} }
void WeatherManager::update(float duration) void WeatherManager::update(float duration, bool paused)
{ {
float timePassed = mTimePassed; float timePassed = mTimePassed;
mTimePassed = 0; mTimePassed = 0;
@ -483,6 +483,8 @@ void WeatherManager::update(float duration)
mRendering->getSkyManager()->secundaDisable(); mRendering->getSkyManager()->secundaDisable();
} }
if (!paused)
{
if (mCurrentWeather == "thunderstorm" && mNextWeather == "") if (mCurrentWeather == "thunderstorm" && mNextWeather == "")
{ {
if (mThunderFlash > 0) if (mThunderFlash > 0)
@ -529,6 +531,8 @@ void WeatherManager::update(float duration)
} }
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,8 +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 stopSounds(bool stopAll); void stopSounds(bool stopAll);

@ -1489,7 +1489,7 @@ namespace MWWorld
if (mGoToJail && !paused) if (mGoToJail && !paused)
goToJail(); goToJail();
updateWeather(duration); updateWeather(duration, paused);
if (!paused) if (!paused)
doPhysics (duration); doPhysics (duration);
@ -2666,7 +2666,7 @@ namespace MWWorld
action.execute(ptr); action.execute(ptr);
} }
void World::updateWeather(float duration) void World::updateWeather(float duration, bool paused)
{ {
if (mPlayer->wasTeleported()) if (mPlayer->wasTeleported())
{ {
@ -2674,7 +2674,7 @@ namespace MWWorld
mWeatherManager->switchToNextWeather(true); mWeatherManager->switchToNextWeather(true);
} }
mWeatherManager->update(duration); mWeatherManager->update(duration, paused);
} }
struct AddDetectedReference struct AddDetectedReference

@ -99,7 +99,7 @@ namespace MWWorld
std::string mStartCell; std::string mStartCell;
void updateWeather(float duration); void updateWeather(float duration, bool paused = false);
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…
Cancel
Save