From 8817a9634ccbab8bae0241b064a646304f24b115 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 17 Aug 2012 16:55:21 +0200 Subject: [PATCH] don't switch to vanity mode as a result of idle time when the gui is opened (e.g. when talking to someone) --- apps/openmw/mwrender/player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/player.cpp b/apps/openmw/mwrender/player.cpp index 953543d991..fb8109a1d5 100644 --- a/apps/openmw/mwrender/player.cpp +++ b/apps/openmw/mwrender/player.cpp @@ -5,6 +5,7 @@ #include #include "../mwbase/environment.hpp" +#include "../mwbase/windowmanager.hpp" #include "../mwbase/soundmanager.hpp" #include "../mwworld/ptr.hpp" @@ -119,7 +120,8 @@ namespace MWRender void Player::update(float duration) { - if (!mVanity.enabled) { + bool isGuiMode = MWBase::Environment::get().getWindowManager ()->isGuiMode(); + if (!mVanity.enabled && !isGuiMode) { ++mUpdates; mTimeIdle += duration; if (mTimeIdle > 30.f) {