diff --git a/QSB/PoolSync/CustomNomaiRemoteCamera.cs b/QSB/PoolSync/CustomNomaiRemoteCamera.cs index e867dfa3..9364fcdf 100644 --- a/QSB/PoolSync/CustomNomaiRemoteCamera.cs +++ b/QSB/PoolSync/CustomNomaiRemoteCamera.cs @@ -4,7 +4,7 @@ namespace QSB.PoolSync; internal class CustomNomaiRemoteCamera : MonoBehaviour { - private OWCamera _camera; + public OWCamera _camera; private AudioListener _audioListener; private NomaiViewerImageEffect _viewerImageEffect; private CustomNomaiRemoteCameraPlatform _owningPlatform; diff --git a/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs b/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs index 0ad8f976..358b53c5 100644 --- a/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs +++ b/QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs @@ -6,6 +6,7 @@ using QSB.Player.Messages; using QSB.Utility; using System.Collections.Generic; using System.Linq; +using System.Reflection; using UnityEngine; namespace QSB.PoolSync; @@ -516,8 +517,16 @@ internal class CustomNomaiRemoteCameraPlatform : NomaiShared private void SwitchToPlayerCamera() { - // does nothing except run CCU's prefix - _oldPlatform.SwitchToPlayerCamera(); + if (QSBCore.Helper.Interaction.ModExists("xen.CommonCameraUtility")) + { + // this is a really fucking dumb fix, but i cannot be + // bothered to rewrite this class to make this work better + var ccuAssembly = QSBCore.Helper.Interaction.TryGetMod("xen.CommonCameraUtility").GetType().Assembly; + var utilClass = ccuAssembly.GetType("CommonCameraUtil.CommonCameraUtil"); + var instance = utilClass.GetField("Instance", BindingFlags.Public | BindingFlags.Static).GetValue(null); + var removeCameraMethod = utilClass.GetMethod("RemoveCamera", BindingFlags.Public | BindingFlags.Instance); + removeCameraMethod.Invoke(instance, new object[] { _slavePlatform._ownedCamera._camera }); + } if (_slavePlatform._visualSector != null) { diff --git a/QSB/manifest.json b/QSB/manifest.json index 20357d06..55aa0efd 100644 --- a/QSB/manifest.json +++ b/QSB/manifest.json @@ -7,7 +7,7 @@ "body": "- Disable *all* other mods. (Can heavily affect performance)\n- Make sure you are not running any other network-intensive applications." }, "uniqueName": "Raicuparta.QuantumSpaceBuddies", - "version": "0.28.2", + "version": "0.28.3", "owmlVersion": "2.9.0", "dependencies": [ "_nebula.MenuFramework", "JohnCorby.VanillaFix" ], "pathsToPreserve": [ "debugsettings.json" ],