mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
fix interference
This commit is contained in:
parent
5b10a570d7
commit
e49dd307f5
@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using QSB.Player;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.Tools.ProbeTool;
|
||||
|
||||
@ -15,8 +16,8 @@ public class QSBProbeCamera : MonoBehaviour
|
||||
private Quaternion _origLocalRotation;
|
||||
private Quaternion _origParentLocalRotation;
|
||||
private Vector2 _cameraRotation = Vector2.zero;
|
||||
private QuantumMoon _quantumMoon;
|
||||
private SandLevelController _sandLevelController;
|
||||
private PlayerInfo owner;
|
||||
|
||||
public event ProbeCamera.RotateCameraEvent OnRotateCamera;
|
||||
|
||||
@ -33,11 +34,8 @@ public class QSBProbeCamera : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
var astroObject = Locator.GetAstroObject(AstroObject.Name.QuantumMoon);
|
||||
if (astroObject != null)
|
||||
{
|
||||
_quantumMoon = astroObject.GetComponent<QuantumMoon>();
|
||||
}
|
||||
var probe = GetComponentInParent<QSBSurveyorProbe>();
|
||||
owner = probe.GetOwner();
|
||||
}
|
||||
|
||||
public static OWCamera GetLastSnapshotCamera() =>
|
||||
@ -53,10 +51,9 @@ public class QSBProbeCamera : MonoBehaviour
|
||||
=> _sandLevelController = sandLevelController;
|
||||
|
||||
public bool HasInterference() =>
|
||||
_id != ProbeCamera.ID.PreLaunch
|
||||
//&& ((this._quantumMoon != null && this._quantumMoon.IsPlayerInside() != this._quantumMoon.IsProbeInside())
|
||||
|| (_sandLevelController != null && _sandLevelController.IsPointBuried(transform.position));
|
||||
//|| (Locator.GetCloakFieldController() != null && Locator.GetCloakFieldController().isPlayerInsideCloak != Locator.GetCloakFieldController().isProbeInsideCloak));
|
||||
(_id != ProbeCamera.ID.PreLaunch && owner.IsInMoon != owner.Probe.InsideQuantumMoon)
|
||||
|| (_sandLevelController != null && _sandLevelController.IsPointBuried(transform.position))
|
||||
|| (Locator.GetCloakFieldController() != null && owner.IsInCloak != owner.Probe.InsideCloak);
|
||||
|
||||
public RenderTexture TakeSnapshot()
|
||||
{
|
||||
|
@ -116,6 +116,8 @@ public class QSBSurveyorProbe : MonoBehaviour, ILightSource
|
||||
_owner = player;
|
||||
}
|
||||
|
||||
public PlayerInfo GetOwner() => _owner;
|
||||
|
||||
private void OnWarpComplete() => Deactivate();
|
||||
|
||||
public bool IsRetrieving()
|
||||
|
Loading…
Reference in New Issue
Block a user