1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 02:45:32 +00:00

disable some player controls in gui mode

This commit is contained in:
scrawl 2012-04-18 19:03:26 +02:00
parent 14ddcc1204
commit 4949576984

View file

@ -97,6 +97,8 @@ namespace MWInput
void toggleSpell()
{
if (windows.isGuiMode()) return;
DrawState state = player.getDrawState();
if (state == DrawState_Weapon || state == DrawState_Nothing)
{
@ -108,11 +110,12 @@ namespace MWInput
player.setDrawState(DrawState_Nothing);
std::cout << "Player does not have any kind of attack ready now.\n";
}
}
void toggleWeapon()
{
if (windows.isGuiMode()) return;
DrawState state = player.getDrawState();
if (state == DrawState_Spell || state == DrawState_Nothing)
{
@ -124,7 +127,6 @@ namespace MWInput
player.setDrawState(DrawState_Nothing);
std::cout << "Player does not have any kind of attack ready now.\n";
}
}
void screenshot()
@ -184,11 +186,13 @@ namespace MWInput
void toggleAutoMove()
{
if (windows.isGuiMode()) return;
player.setAutoMove (!player.getAutoMove());
}
void toggleWalking()
{
if (windows.isGuiMode()) return;
player.toggleRunning();
}