Skip to content

Commit

Permalink
Changelog and cutscene changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DaXcess committed Apr 13, 2024
1 parent 1eb8102 commit aff5d92
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
# 1.2.1

### V50 IS HERE

LCVR v1.2.1 brings the joys of V50 into VR.

Due to V50 having changed some important stuff behind the scenes, versions starting from v1.2.1 are no longer supported in V49.

**Additions**:
- Added support for the cold open cinematic cutscene

**Bug fixes:**

- Fixed corrupt/improper OpenXR setup causing the settings menu to not load
- Fixed a benign warning when loading input bindings
- Reduced impact of playerspace spoofing hacks
- Fixed an issue where somehow getting the camera out of water would prevent drowning
- Fixed Diversity custom pass warping rendering when DynRes is enabled
- Fixed the rad mech trying to pick up dead players

**API changes**:
- Made the arm HUD canvasses public in `VRSession.Instance.HUD`

**Removals:**
- Removed april fools code & assets
- Removed support for V49

# 1.2.0

Expand Down
Binary file modified Resources/lethalcompanyvr
Binary file not shown.
14 changes: 10 additions & 4 deletions Source/Patches/CutscenePatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ private class VRCutscene : MonoBehaviour
private Transform cameraContainer;
private Transform cameraTransform;

public float initialCameraRotation;
private float initialCameraRotation;
private Vector3 initialCameraPosition;

private void Awake()
{
cameraContainer = GameObject.Find("CameraControllerContainer/CameraController").transform;
cameraTransform = cameraContainer.Find("MainCamera");

// Disable chair since we assume VR players are standing up
GameObject.Find("ComputerChairAndShelf")?.SetActive(false);

StartCoroutine(delayedResetHeight());
StartCoroutine(delayedResetHMD());
}

private void Update()
Expand All @@ -58,17 +62,19 @@ private void LateUpdate()
cameraContainer.transform.localEulerAngles = new Vector3(0, -initialCameraRotation, 0);
}

private IEnumerator delayedResetHeight()
private IEnumerator delayedResetHMD()
{
yield return new WaitForSeconds(0.1f);

initialCameraRotation = cameraTransform.localEulerAngles.y;
initialCameraPosition = (cameraContainer.localPosition - cameraTransform.localPosition) * 1.8f;

ResetHeight();
}

private void ResetHeight()
{
cameraContainer.localPosition = new Vector3(0, -cameraTransform.localPosition.y, 0);
cameraContainer.localPosition = new Vector3(initialCameraPosition.x, -cameraTransform.localPosition.y, initialCameraPosition.z);
}
}
}

0 comments on commit aff5d92

Please sign in to comment.