From 71da2f0a12bb6410610ff3f9e5559e238de8c910 Mon Sep 17 00:00:00 2001 From: Emanuel Guevel Date: Sun, 4 Aug 2013 00:21:27 +0200 Subject: [PATCH] Do not allow magic/combat stance unless magic/inventory window are accessible --- apps/openmw/mwinput/inputmanagerimp.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 02b8520ab..d15e95171 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -643,6 +643,10 @@ namespace MWInput { if (mWindows.isGuiMode()) return; + // Not allowed before the magic window is accessible + if (!mWindows.isAllowed(MWGui::GW_Magic)) + return; + MWMechanics::DrawState_ state = mPlayer.getDrawState(); if (state == MWMechanics::DrawState_Weapon || state == MWMechanics::DrawState_Nothing) mPlayer.setDrawState(MWMechanics::DrawState_Spell); @@ -654,6 +658,10 @@ namespace MWInput { if (mWindows.isGuiMode()) return; + // Not allowed before the inventory window is accessible + if (!mWindows.isAllowed(MWGui::GW_Inventory)) + return; + MWMechanics::DrawState_ state = mPlayer.getDrawState(); if (state == MWMechanics::DrawState_Spell || state == MWMechanics::DrawState_Nothing) mPlayer.setDrawState(MWMechanics::DrawState_Weapon);