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:
parent
14ddcc1204
commit
4949576984
1 changed files with 26 additions and 22 deletions
|
@ -97,34 +97,36 @@ namespace MWInput
|
||||||
|
|
||||||
void toggleSpell()
|
void toggleSpell()
|
||||||
{
|
{
|
||||||
DrawState state = player.getDrawState();
|
if (windows.isGuiMode()) return;
|
||||||
if(state == DrawState_Weapon || state == DrawState_Nothing)
|
|
||||||
{
|
|
||||||
player.setDrawState(DrawState_Spell);
|
|
||||||
std::cout << "Player has now readied his hands for spellcasting!\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setDrawState(DrawState_Nothing);
|
|
||||||
std::cout << "Player does not have any kind of attack ready now.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
DrawState state = player.getDrawState();
|
||||||
|
if (state == DrawState_Weapon || state == DrawState_Nothing)
|
||||||
|
{
|
||||||
|
player.setDrawState(DrawState_Spell);
|
||||||
|
std::cout << "Player has now readied his hands for spellcasting!\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.setDrawState(DrawState_Nothing);
|
||||||
|
std::cout << "Player does not have any kind of attack ready now.\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleWeapon()
|
void toggleWeapon()
|
||||||
{
|
{
|
||||||
DrawState state = player.getDrawState();
|
if (windows.isGuiMode()) return;
|
||||||
if(state == DrawState_Spell || state == DrawState_Nothing)
|
|
||||||
{
|
|
||||||
player.setDrawState(DrawState_Weapon);
|
|
||||||
std::cout << "Player is now drawing his weapon.\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setDrawState(DrawState_Nothing);
|
|
||||||
std::cout << "Player does not have any kind of attack ready now.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
DrawState state = player.getDrawState();
|
||||||
|
if (state == DrawState_Spell || state == DrawState_Nothing)
|
||||||
|
{
|
||||||
|
player.setDrawState(DrawState_Weapon);
|
||||||
|
std::cout << "Player is now drawing his weapon.\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.setDrawState(DrawState_Nothing);
|
||||||
|
std::cout << "Player does not have any kind of attack ready now.\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void screenshot()
|
void screenshot()
|
||||||
|
@ -184,11 +186,13 @@ namespace MWInput
|
||||||
|
|
||||||
void toggleAutoMove()
|
void toggleAutoMove()
|
||||||
{
|
{
|
||||||
|
if (windows.isGuiMode()) return;
|
||||||
player.setAutoMove (!player.getAutoMove());
|
player.setAutoMove (!player.getAutoMove());
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleWalking()
|
void toggleWalking()
|
||||||
{
|
{
|
||||||
|
if (windows.isGuiMode()) return;
|
||||||
player.toggleRunning();
|
player.toggleRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue