mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-04 03:39:55 +00:00
push
This commit is contained in:
parent
57f01903bb
commit
a7284cf945
@ -1,4 +1,5 @@
|
|||||||
using QSB.QuantumSync.WorldObjects;
|
using OWML.Utils;
|
||||||
|
using QSB.QuantumSync.WorldObjects;
|
||||||
using QSB.WorldSync;
|
using QSB.WorldSync;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -30,6 +31,25 @@ namespace QSB.QuantumSync
|
|||||||
_quantumShuffleObjects = QSBWorldSync.Init<QSBQuantumShuffleObject, QuantumShuffleObject>();
|
_quantumShuffleObjects = QSBWorldSync.Init<QSBQuantumShuffleObject, QuantumShuffleObject>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnRenderObject()
|
||||||
|
{
|
||||||
|
if (!QSBCore.HasWokenUp)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
foreach (var item in _socketedQuantumObjects)
|
||||||
|
{
|
||||||
|
if (!item.gameObject.activeInHierarchy)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Popcron.Gizmos.Sphere(item.transform.position, 5f, item.IsVisible() ? Color.green : Color.red);
|
||||||
|
}
|
||||||
|
Popcron.Gizmos.Sphere(Locator.GetQuantumMoon().transform.position, 120f, Color.cyan, true);
|
||||||
|
var visTracker = Locator.GetQuantumMoon().GetValue<VisibilityTracker>("_visibilityTracker");
|
||||||
|
Popcron.Gizmos.Sphere(visTracker.transform.position, 130f, visTracker.IsVisibleUsingCameraFrustum() ? Color.green : Color.red);
|
||||||
|
}
|
||||||
|
|
||||||
public int GetId(SocketedQuantumObject obj) => _socketedQuantumObjects.IndexOf(obj);
|
public int GetId(SocketedQuantumObject obj) => _socketedQuantumObjects.IndexOf(obj);
|
||||||
public int GetId(MultiStateQuantumObject obj) => _multiStateQuantumObjects.IndexOf(obj);
|
public int GetId(MultiStateQuantumObject obj) => _multiStateQuantumObjects.IndexOf(obj);
|
||||||
public int GetId(QuantumSocket obj) => _quantumSockets.IndexOf(obj);
|
public int GetId(QuantumSocket obj) => _quantumSockets.IndexOf(obj);
|
||||||
|
@ -38,6 +38,15 @@ namespace QSB.TransformSync
|
|||||||
return body.transform;
|
return body.transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnRenderObject()
|
||||||
|
{
|
||||||
|
if (!QSBCore.HasWokenUp || !Player.IsReady)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Popcron.Gizmos.Cone(Player.CameraBody.transform.position, Player.CameraBody.transform.rotation, 10f, 45f);
|
||||||
|
}
|
||||||
|
|
||||||
public override bool IsReady => Locator.GetPlayerTransform() != null
|
public override bool IsReady => Locator.GetPlayerTransform() != null
|
||||||
&& Player != null
|
&& Player != null
|
||||||
&& QSBPlayerManager.PlayerExists(Player.PlayerId)
|
&& QSBPlayerManager.PlayerExists(Player.PlayerId)
|
||||||
|
@ -54,7 +54,7 @@ namespace QSB.TransformSync
|
|||||||
|
|
||||||
private void OnRenderObject()
|
private void OnRenderObject()
|
||||||
{
|
{
|
||||||
if (!QSBCore.HasWokenUp)
|
if (!QSBCore.HasWokenUp || !Player.IsReady)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user