(a9fbb0120) Disable controls when the pause menu or settings menu is open. Closes #1391

This commit is contained in:
Joonas Rikkonen
2019-04-08 19:16:37 +03:00
parent e19bf22112
commit 63971c90a9
3 changed files with 14 additions and 1 deletions
@@ -155,7 +155,7 @@ namespace Barotrauma
/// </summary>
public void ControlLocalPlayer(float deltaTime, Camera cam, bool moveCam = true)
{
if (DisableControls)
if (DisableControls || GUI.PauseMenuOpen || GUI.SettingsMenuOpen)
{
foreach (Key key in keys)
{
@@ -276,6 +276,9 @@ namespace Barotrauma
characterInfos.Add(characterInfo);
}
characterInfos.Add(characterInfo);
}
/// <summary>
/// Remove the character from the crew (and crew menus).
/// </summary>
@@ -153,6 +153,16 @@ namespace Barotrauma
get { return binding; }
}
public void SetState()
{
hit = binding.IsHit();
if (hit) hitQueue = true;
held = binding.IsDown();
if (held) heldQueue = true;
}
#endif
public void SetState()
{
hit = binding.IsHit();