|
|
|
@ -154,7 +154,7 @@ namespace MWWorld
|
|
|
|
|
mActivationDistanceOverride (activationDistanceOverride), mStartupScript(startupScript),
|
|
|
|
|
mStartCell (startCell), mDistanceToFacedObject(-1), mTeleportEnabled(true),
|
|
|
|
|
mLevitationEnabled(true), mGoToJail(false), mDaysInPrison(0),
|
|
|
|
|
mPlayerTraveling(false), mSpellPreloadTimer(0.f)
|
|
|
|
|
mPlayerTraveling(false), mPlayerInJail(false), mSpellPreloadTimer(0.f)
|
|
|
|
|
{
|
|
|
|
|
mPhysics.reset(new MWPhysics::PhysicsSystem(resourceSystem, rootNode));
|
|
|
|
|
mRendering.reset(new MWRender::RenderingManager(viewer, rootNode, resourceSystem, workQueue, &mFallback, resourcePath));
|
|
|
|
@ -313,6 +313,7 @@ namespace MWWorld
|
|
|
|
|
mTeleportEnabled = true;
|
|
|
|
|
mLevitationEnabled = true;
|
|
|
|
|
mPlayerTraveling = false;
|
|
|
|
|
mPlayerInJail = false;
|
|
|
|
|
|
|
|
|
|
fillGlobalVariables();
|
|
|
|
|
}
|
|
|
|
@ -1641,11 +1642,17 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
void World::update (float duration, bool paused)
|
|
|
|
|
{
|
|
|
|
|
if (mGoToJail && !paused)
|
|
|
|
|
goToJail();
|
|
|
|
|
|
|
|
|
|
// Reset "traveling" flag - there was a frame to detect traveling.
|
|
|
|
|
mPlayerTraveling = false;
|
|
|
|
|
|
|
|
|
|
if (mGoToJail && !paused)
|
|
|
|
|
goToJail();
|
|
|
|
|
// The same thing for "in jail" flag: reset it if:
|
|
|
|
|
// 1. Player was in jail
|
|
|
|
|
// 2. Jailing window was closed
|
|
|
|
|
if (mPlayerInJail && !mGoToJail && !MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Jail))
|
|
|
|
|
mPlayerInJail = false;
|
|
|
|
|
|
|
|
|
|
updateWeather(duration, paused);
|
|
|
|
|
|
|
|
|
@ -3286,6 +3293,7 @@ namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
// Reset bounty and forget the crime now, but don't change cell yet (the player should be able to read the dialog text first)
|
|
|
|
|
mGoToJail = true;
|
|
|
|
|
mPlayerInJail = true;
|
|
|
|
|
|
|
|
|
|
MWWorld::Ptr player = getPlayerPtr();
|
|
|
|
|
|
|
|
|
@ -3311,10 +3319,7 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
bool World::isPlayerInJail() const
|
|
|
|
|
{
|
|
|
|
|
if (mGoToJail)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
return MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Jail);
|
|
|
|
|
return mPlayerInJail;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void World::setPlayerTraveling(bool traveling)
|
|
|
|
|