mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
Update NomaiOrbTransformSync.cs
This commit is contained in:
parent
719783b22e
commit
54a6bfd21e
@ -2,6 +2,7 @@
|
||||
using QSB.OrbSync.WorldObjects;
|
||||
using QSB.Syncs.Unsectored.Transforms;
|
||||
using QSB.WorldSync;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@ -64,9 +65,15 @@ namespace QSB.OrbSync.TransformSync
|
||||
netIdentity.UnregisterAuthQueue();
|
||||
}
|
||||
|
||||
var body = AttachedTransform.GetAttachedOWRigidbody();
|
||||
body.OnUnsuspendOWRigidbody -= OnUnsuspend;
|
||||
body.OnSuspendOWRigidbody -= OnSuspend;
|
||||
if (AttachedTransform)
|
||||
{
|
||||
var body = AttachedTransform.GetAttachedOWRigidbody();
|
||||
if (body)
|
||||
{
|
||||
body.OnUnsuspendOWRigidbody -= OnUnsuspend;
|
||||
body.OnSuspendOWRigidbody -= OnSuspend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUnsuspend(OWRigidbody suspendedBody) => netIdentity.SendAuthQueueMessage(AuthQueueAction.Add);
|
||||
|
Loading…
Reference in New Issue
Block a user