Player input is updated only when game windows is active
This commit is contained in:
@@ -143,6 +143,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
timeSinceClick += deltaTime;
|
timeSinceClick += deltaTime;
|
||||||
|
|
||||||
|
if (GameMain.Instance.IsActive)
|
||||||
|
{
|
||||||
oldMouseState = mouseState;
|
oldMouseState = mouseState;
|
||||||
mouseState = latestMouseState;
|
mouseState = latestMouseState;
|
||||||
UpdateVariable();
|
UpdateVariable();
|
||||||
@@ -162,6 +164,7 @@ namespace Barotrauma
|
|||||||
timeSinceClick = 0.0;
|
timeSinceClick = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void UpdateVariable()
|
public static void UpdateVariable()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user