mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 16:45:17 -04:00
don't switch to vanity mode as a result of idle time when the gui is opened (e.g. when talking to someone)
This commit is contained in:
parent
296b61f476
commit
8817a9634c
@ -5,6 +5,7 @@
|
|||||||
#include <OgreRay.h>
|
#include <OgreRay.h>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
|
#include "../mwbase/windowmanager.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
#include "../mwbase/soundmanager.hpp"
|
||||||
|
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
@ -119,7 +120,8 @@ namespace MWRender
|
|||||||
|
|
||||||
void Player::update(float duration)
|
void Player::update(float duration)
|
||||||
{
|
{
|
||||||
if (!mVanity.enabled) {
|
bool isGuiMode = MWBase::Environment::get().getWindowManager ()->isGuiMode();
|
||||||
|
if (!mVanity.enabled && !isGuiMode) {
|
||||||
++mUpdates;
|
++mUpdates;
|
||||||
mTimeIdle += duration;
|
mTimeIdle += duration;
|
||||||
if (mTimeIdle > 30.f) {
|
if (mTimeIdle > 30.f) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user