Fixed launcher throwing a null reference exception because of a reference to GameMain in PlayerInput

This commit is contained in:
Joonas Rikkonen
2018-02-21 23:43:40 +02:00
parent 637d473773
commit b4582b6188
2 changed files with 20 additions and 20 deletions
@@ -361,7 +361,10 @@ namespace Barotrauma
fixedTime.TotalGameTime.Add(addTime); fixedTime.TotalGameTime.Add(addTime);
base.Update(fixedTime); base.Update(fixedTime);
if (WindowActive)
{
PlayerInput.Update(Timing.Step); PlayerInput.Update(Timing.Step);
}
if (loadingScreenOpen) if (loadingScreenOpen)
{ {
@@ -143,8 +143,6 @@ namespace Barotrauma
{ {
timeSinceClick += deltaTime; timeSinceClick += deltaTime;
if (GameMain.Instance.IsActive)
{
oldMouseState = mouseState; oldMouseState = mouseState;
mouseState = latestMouseState; mouseState = latestMouseState;
UpdateVariable(); UpdateVariable();
@@ -164,7 +162,6 @@ namespace Barotrauma
timeSinceClick = 0.0; timeSinceClick = 0.0;
} }
} }
}
public static void UpdateVariable() public static void UpdateVariable()
{ {