mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
add root identity set to unparentedbaserigidbodysync
This commit is contained in:
parent
aa7f9b810c
commit
8591e2136c
@ -1,7 +1,9 @@
|
||||
using OWML.Common;
|
||||
using OWML.Utils;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.Utility;
|
||||
using QuantumUNET.Transport;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.Syncs.RigidbodySync
|
||||
@ -17,6 +19,10 @@ namespace QSB.Syncs.RigidbodySync
|
||||
|
||||
public virtual void Start()
|
||||
{
|
||||
var lowestBound = Resources.FindObjectsOfTypeAll<PlayerTransformSync>()
|
||||
.Where(x => x.NetId.Value <= NetId.Value).OrderBy(x => x.NetId.Value).Last();
|
||||
NetIdentity.SetRootIdentity(lowestBound.NetIdentity);
|
||||
|
||||
DontDestroyOnLoad(gameObject);
|
||||
_intermediaryTransform = new IntermediaryTransform(transform);
|
||||
QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
|
||||
|
Loading…
x
Reference in New Issue
Block a user