fix probe light

This commit is contained in:
Mister_Nebula 2021-07-05 21:08:25 +01:00
parent edac51824e
commit ab2c33d628
3 changed files with 8 additions and 5 deletions

View File

@ -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;
}

View File

@ -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<OWLight2>();
_intensity = _light.GetLight().intensity;
//_intensity = _light.GetLight().intensity;
_light.GetLight().enabled = false;
enabled = false;
_probe.OnLaunchProbe += OnLaunch;

View File

@ -65,7 +65,6 @@ namespace QSB.Tools
Object.Destroy(probeDetector.GetComponent<ProbeFluidDetector>());
Object.Destroy(probeDetector.GetComponent<AlignmentForceDetector>());
// CameraPivot
var cameraPivot = newProbe.Find("CameraPivot");
Object.Destroy(cameraPivot.GetComponent<ProbeHorizonTracker>());
@ -91,6 +90,7 @@ namespace QSB.Tools
var newForwardSpotlight = forwardCamera.gameObject.AddComponent<QSBProbeSpotlight>();
newForwardSpotlight._id = oldForwardSpotlight.GetValue<ProbeCamera.ID>("_id");
newForwardSpotlight._fadeInLength = oldForwardSpotlight.GetValue<float>("_fadeInLength");
newForwardSpotlight._intensity = oldForwardSpotlight.GetValue<float>("_intensity");
Object.Destroy(oldForwardSpotlight);
// CameraPivot/RotatingCameraPivot/RotatingCamera
@ -123,6 +123,7 @@ namespace QSB.Tools
newAmbLantern._fadeInCurve = oldAmbLantern.GetValue<AnimationCurve>("_fadeInCurve");
newAmbLantern._fadeOutCurve = oldAmbLantern.GetValue<AnimationCurve>("_fadeOutCurve");
newAmbLantern._emissiveRenderer = oldAmbLantern.GetValue<OWEmissiveRenderer>("_emissiveRenderer");
newAmbLantern._originalRange = oldAmbLantern.GetValue<float>("_originalRange");
Object.Destroy(oldAmbLantern);
// Lantern
@ -133,6 +134,7 @@ namespace QSB.Tools
newLantern._fadeInCurve = oldLantern.GetValue<AnimationCurve>("_fadeInCurve");
newLantern._fadeOutCurve = oldLantern.GetValue<AnimationCurve>("_fadeOutCurve");
newLantern._emissiveRenderer = oldLantern.GetValue<OWEmissiveRenderer>("_emissiveRenderer");
newLantern._originalRange = oldLantern.GetValue<float>("_originalRange");
Object.Destroy(oldLantern);
// RearCamera
@ -147,6 +149,7 @@ namespace QSB.Tools
var newRearSpotlight = rearCamera.gameObject.AddComponent<QSBProbeSpotlight>();
newRearSpotlight._id = oldRearSpotlight.GetValue<ProbeCamera.ID>("_id");
newRearSpotlight._fadeInLength = oldRearSpotlight.GetValue<float>("_fadeInLength");
newRearSpotlight._intensity = oldRearSpotlight.GetValue<float>("_intensity");
Object.Destroy(oldRearSpotlight);
// PlaneOffsetMarker_Probe