Skip to content

Commit

Permalink
fix nre
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Sep 28, 2023
1 parent 2bddd4e commit f8454f8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ public static bool IsInFrustum(ShapeVisibilityTracker __instance, Plane[] frustu
{
// todo : cache this somewhere? seems slow.
var quantumObject = __instance.GetComponentInParent<QuantumObject>();

if (quantumObject == null)
{
__result = false;
return true;
}

var worldObject = quantumObject.GetWorldObject<IQSBQuantumObject>();
foreach (var shape in __instance._shapes)
{
Expand Down

0 comments on commit f8454f8

Please sign in to comment.