From 80ce2ae6aeaf2ba1396f608229da1165d0abff87 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 29 Jan 2018 10:27:43 +0200 Subject: [PATCH 1/3] Fixed the game running for one more frame after the debugconsole is opened, and staying paused for one extra frame after closing it. Caused the mouselook distance to lerp back from zero after toggling the console. --- Barotrauma/BarotraumaClient/Source/Characters/Character.cs | 2 +- Barotrauma/BarotraumaClient/Source/GameMain.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaClient/Source/Characters/Character.cs b/Barotrauma/BarotraumaClient/Source/Characters/Character.cs index 485390d78..70e6b96f6 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/Character.cs @@ -123,7 +123,7 @@ namespace Barotrauma Vector2 mouseSimPos = ConvertUnits.ToSimUnits(cursorPosition); if (moveCam) { - if (DebugConsole.IsOpen || GUI.PauseMenuOpen || DisableControls || + if (DebugConsole.IsOpen || GUI.PauseMenuOpen || IsUnconscious || (GameMain.GameSession?.CrewManager?.CrewCommander != null && GameMain.GameSession.CrewManager.CrewCommander.IsOpen)) { if (deltaTime > 0.0f) cam.OffsetAmount = 0.0f; diff --git a/Barotrauma/BarotraumaClient/Source/GameMain.cs b/Barotrauma/BarotraumaClient/Source/GameMain.cs index abc15b4e2..78c9fbfd3 100644 --- a/Barotrauma/BarotraumaClient/Source/GameMain.cs +++ b/Barotrauma/BarotraumaClient/Source/GameMain.cs @@ -406,6 +406,7 @@ namespace Barotrauma GUIComponent.UpdateMouseOn(); DebugConsole.Update(this, (float)Timing.Step); + paused = paused || DebugConsole.IsOpen; if (!paused) { From 2e9cb6530c8d4f61accfa103f2d5998bd2b6cd99 Mon Sep 17 00:00:00 2001 From: shoter Date: Mon, 29 Jan 2018 23:23:37 +0100 Subject: [PATCH 2/3] Player input is updated only when game windows is active --- .../BarotraumaClient/Source/PlayerInput.cs | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/PlayerInput.cs b/Barotrauma/BarotraumaClient/Source/PlayerInput.cs index 1ba204ecf..bbff9c1f7 100644 --- a/Barotrauma/BarotraumaClient/Source/PlayerInput.cs +++ b/Barotrauma/BarotraumaClient/Source/PlayerInput.cs @@ -143,23 +143,26 @@ namespace Barotrauma { timeSinceClick += deltaTime; - oldMouseState = mouseState; - mouseState = latestMouseState; - UpdateVariable(); - - oldKeyboardState = keyboardState; - keyboardState = Keyboard.GetState(); - - doubleClicked = false; - if (LeftButtonClicked()) + if (GameMain.Instance.IsActive) { - if (timeSinceClick < DoubleClickDelay && - (mouseState.Position - lastClickPosition).ToVector2().Length() < MaxDoubleClickDistance) + oldMouseState = mouseState; + mouseState = latestMouseState; + UpdateVariable(); + + oldKeyboardState = keyboardState; + keyboardState = Keyboard.GetState(); + + doubleClicked = false; + if (LeftButtonClicked()) { - doubleClicked = true; + if (timeSinceClick < DoubleClickDelay && + (mouseState.Position - lastClickPosition).ToVector2().Length() < MaxDoubleClickDistance) + { + doubleClicked = true; + } + lastClickPosition = mouseState.Position; + timeSinceClick = 0.0; } - lastClickPosition = mouseState.Position; - timeSinceClick = 0.0; } } From 084645af1bb04d5d145f299656cdc42433cb8a00 Mon Sep 17 00:00:00 2001 From: Arthur Kavanagh Date: Tue, 30 Jan 2018 10:52:25 -0500 Subject: [PATCH 3/3] Fix Mono 5.4 link URIs without a protocol are interpreted as relative resources in Markdown --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4a97ce5d..a02377f18 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,6 @@ Before downloading the source code, please read the [EULA](EULA.txt). ### Windows - [Visual Studio](https://www.visualstudio.com/vs/community/) with C# 6.0 support (VS 2015 or later recommended) ### Linux -- [Mono 5.4](www.mono-project.com) +- [Mono 5.4](http://www.mono-project.com) - [MonoDevelop 6](http://www.monodevelop.com/) - *Note: See http://community.monogame.net/t/installing-monogame-3-6-on-linux/8811 to get this version of MonoDevelop if your distro's package distribution suite is outdated.*