forked from mirror/openmw-tes3mp
Fix ReferenceInterface not resetting the Ptr after it was deleted, causing onReferenceUnavailable to be called every frame. Fix inputmanager hiding the cursor when it shouldn't.
This commit is contained in:
parent
1a2daa3bc1
commit
8fd961bbac
2 changed files with 8 additions and 20 deletions
|
@ -26,7 +26,10 @@ namespace MWGui
|
|||
// check if player has changed cell, or count of the reference has become 0
|
||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
||||
|| mPtr.getRefData().getCount() == 0)
|
||||
{
|
||||
mPtr = MWWorld::Ptr();
|
||||
onReferenceUnavailable();
|
||||
}
|
||||
|
||||
mCurrentPlayerCell = playerCell;
|
||||
}
|
||||
|
|
|
@ -372,26 +372,11 @@ namespace MWInput
|
|||
void InputManager::changeInputMode(bool guiMode)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setMouseVisible(guiMode);
|
||||
mGuiCursorEnabled = guiMode;
|
||||
mMouseLookEnabled = !guiMode;
|
||||
if (guiMode)
|
||||
{
|
||||
// Disable mouse look
|
||||
mMouseLookEnabled = false;
|
||||
|
||||
mWindows.showCrosshair(false);
|
||||
|
||||
// Enable GUI events
|
||||
mGuiCursorEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Enable mouse look
|
||||
mMouseLookEnabled = true;
|
||||
|
||||
mWindows.showCrosshair (false);
|
||||
|
||||
// Disable GUI events
|
||||
mGuiCursorEnabled = false;
|
||||
}
|
||||
// if not in gui mode, the camera decides whether to show crosshair or not.
|
||||
}
|
||||
|
||||
void InputManager::processChangedSettings(const Settings::CategorySettingVector& changed)
|
||||
|
|
Loading…
Reference in a new issue