Skip to content

Commit

Permalink
fix ultrasoap (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
xzxADIxzx committed Oct 8, 2023
1 parent 5b15af0 commit 8a3e3d1
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions world/Movement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 8a3e3d1

Please # to comment.