Player input is updated only when game windows is active

This commit is contained in:
shoter
2018-01-29 23:23:37 +01:00
parent 80ce2ae6ae
commit 2e9cb6530c
@@ -143,6 +143,8 @@ namespace Barotrauma
{
timeSinceClick += deltaTime;
if (GameMain.Instance.IsActive)
{
oldMouseState = mouseState;
mouseState = latestMouseState;
UpdateVariable();
@@ -162,6 +164,7 @@ namespace Barotrauma
timeSinceClick = 0.0;
}
}
}
public static void UpdateVariable()
{