Fixed launcher throwing a null reference exception because of a reference to GameMain in PlayerInput
This commit is contained in:
@@ -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()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user