From 8a3e3d1d145e6588304bed09bd96331a20f4d140 Mon Sep 17 00:00:00 2001 From: Valera <76255437+xzxADIxzx@users.noreply.github.com> Date: Sun, 8 Oct 2023 14:12:30 +0300 Subject: [PATCH] fix ultrasoap (again) --- world/Movement.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/world/Movement.cs b/world/Movement.cs index c18db022..ae14a7b3 100644 --- a/world/Movement.cs +++ b/world/Movement.cs @@ -116,6 +116,17 @@ public void LateUpdate() // late update is needed in order to overwrite the time } + // ultrasoap + if (SceneHelper.CurrentScene != "Main Menu" && !NewMovement.Instance.dead) + { + rb.constraints = Chat.Instance.Shown || OptionsManager.Instance.paused || Console.IsOpen + ? RigidbodyConstraints.FreezeAll + : Instance.Emoji == 0xFF || Instance.Emoji == 0x0B // skateboard + ? RigidbodyConstraints.FreezeRotation + : (RigidbodyConstraints)122; + } + + // all the following changes are related to the network part of the game and shouldn't affect the local if (LobbyController.Lobby == null) return; @@ -135,13 +146,6 @@ public static void UpdateState() ToggleCursor(Chat.Instance.Shown || PlayerList.Instance.Shown); ToggleHud(Instance.Emoji == 0xFF); - // fix ultrasoap - rb.constraints = Chat.Instance.Shown - ? RigidbodyConstraints.FreezeAll - : Instance.Emoji == 0xFF || Instance.Emoji == 0x0B // skateboard - ? RigidbodyConstraints.FreezeRotation - : (RigidbodyConstraints)122; - // block camera rotation CameraController.Instance.enabled = CameraController.Instance.activated = !Chat.Instance.Shown && !PlayerList.Instance.Shown && Instance.Emoji == 0xFF;