From ab2c33d628a190370f50257f667009c1e6955710 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Mon, 5 Jul 2021 21:08:25 +0100 Subject: [PATCH] fix probe light --- QSB/ProbeSync/QSBProbeLantern.cs | 4 ++-- QSB/ProbeSync/QSBProbeSpotlight.cs | 4 ++-- QSB/Tools/PlayerToolsManager.cs | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/QSB/ProbeSync/QSBProbeLantern.cs b/QSB/ProbeSync/QSBProbeLantern.cs index 3ba5310c..ee36d353 100644 --- a/QSB/ProbeSync/QSBProbeLantern.cs +++ b/QSB/ProbeSync/QSBProbeLantern.cs @@ -10,10 +10,10 @@ namespace QSB.ProbeSync public AnimationCurve _fadeInCurve; public AnimationCurve _fadeOutCurve; public OWEmissiveRenderer _emissiveRenderer; + public float _originalRange; private QSBProbe _probe; private OWLight2 _light; - private float _originalRange; private float _fadeFraction; private float _targetFade; private float _startFade; @@ -42,7 +42,7 @@ namespace QSB.ProbeSync } _light.GetLight().enabled = false; - _originalRange = _light.range; + //_originalRange = _light.range; enabled = false; } diff --git a/QSB/ProbeSync/QSBProbeSpotlight.cs b/QSB/ProbeSync/QSBProbeSpotlight.cs index 545ff4c5..1c65aca2 100644 --- a/QSB/ProbeSync/QSBProbeSpotlight.cs +++ b/QSB/ProbeSync/QSBProbeSpotlight.cs @@ -8,11 +8,11 @@ namespace QSB.ProbeSync { public ProbeCamera.ID _id; public float _fadeInLength = 1f; + public float _intensity; private QSBProbe _probe; private OWLight2 _light; private bool _inFlight; - private float _intensity; private float _timer; private void Awake() @@ -24,7 +24,7 @@ namespace QSB.ProbeSync } _light = GetComponent(); - _intensity = _light.GetLight().intensity; + //_intensity = _light.GetLight().intensity; _light.GetLight().enabled = false; enabled = false; _probe.OnLaunchProbe += OnLaunch; diff --git a/QSB/Tools/PlayerToolsManager.cs b/QSB/Tools/PlayerToolsManager.cs index b7db2a29..40c47137 100644 --- a/QSB/Tools/PlayerToolsManager.cs +++ b/QSB/Tools/PlayerToolsManager.cs @@ -65,7 +65,6 @@ namespace QSB.Tools Object.Destroy(probeDetector.GetComponent()); Object.Destroy(probeDetector.GetComponent()); - // CameraPivot var cameraPivot = newProbe.Find("CameraPivot"); Object.Destroy(cameraPivot.GetComponent()); @@ -91,6 +90,7 @@ namespace QSB.Tools var newForwardSpotlight = forwardCamera.gameObject.AddComponent(); newForwardSpotlight._id = oldForwardSpotlight.GetValue("_id"); newForwardSpotlight._fadeInLength = oldForwardSpotlight.GetValue("_fadeInLength"); + newForwardSpotlight._intensity = oldForwardSpotlight.GetValue("_intensity"); Object.Destroy(oldForwardSpotlight); // CameraPivot/RotatingCameraPivot/RotatingCamera @@ -123,6 +123,7 @@ namespace QSB.Tools newAmbLantern._fadeInCurve = oldAmbLantern.GetValue("_fadeInCurve"); newAmbLantern._fadeOutCurve = oldAmbLantern.GetValue("_fadeOutCurve"); newAmbLantern._emissiveRenderer = oldAmbLantern.GetValue("_emissiveRenderer"); + newAmbLantern._originalRange = oldAmbLantern.GetValue("_originalRange"); Object.Destroy(oldAmbLantern); // Lantern @@ -133,6 +134,7 @@ namespace QSB.Tools newLantern._fadeInCurve = oldLantern.GetValue("_fadeInCurve"); newLantern._fadeOutCurve = oldLantern.GetValue("_fadeOutCurve"); newLantern._emissiveRenderer = oldLantern.GetValue("_emissiveRenderer"); + newLantern._originalRange = oldLantern.GetValue("_originalRange"); Object.Destroy(oldLantern); // RearCamera @@ -147,6 +149,7 @@ namespace QSB.Tools var newRearSpotlight = rearCamera.gameObject.AddComponent(); newRearSpotlight._id = oldRearSpotlight.GetValue("_id"); newRearSpotlight._fadeInLength = oldRearSpotlight.GetValue("_fadeInLength"); + newRearSpotlight._intensity = oldRearSpotlight.GetValue("_intensity"); Object.Destroy(oldRearSpotlight); // PlaneOffsetMarker_Probe