mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 20:45:33 +00:00
Do not allow magic/combat stance unless magic/inventory window are accessible
This commit is contained in:
parent
41b2fa985b
commit
71da2f0a12
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue