From 9f11bc93edaec71decc83bd3f15bc67038d5980e Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:07:48 +0100 Subject: [PATCH 1/2] fix ccu support --- QSB/PoolSync/CustomNomaiRemoteCamera.cs | 2 +- QSB/PoolSync/CustomNomaiRemoteCameraPlatform.cs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) 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) { From ed2b3e49e9a5cbb286952ca61ca9b2940da5599e Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 25 Jun 2023 15:08:02 +0100 Subject: [PATCH 2/2] Update manifest.json --- QSB/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ],