migrate syncbase

This commit is contained in:
JohnCorby 2022-05-03 22:04:33 -07:00
parent bedf50262f
commit 4257b40461

View File

@ -134,20 +134,20 @@ public abstract class SyncBase : QSBNetworkTransform
.MaxBy(x => x.PlayerId);
}
QSBSceneManager.OnSceneLoaded += OnSceneLoaded;
QSBSceneManager.OnPreSceneLoad += OnPreSceneLoad;
}
public override void OnStopClient()
{
base.OnStopClient();
QSBSceneManager.OnSceneLoaded -= OnSceneLoaded;
QSBSceneManager.OnPreSceneLoad -= OnPreSceneLoad;
if (IsInitialized)
{
SafeUninit();
}
}
private void OnSceneLoaded(OWScene oldScene, OWScene newScene, bool isInUniverse)
private void OnPreSceneLoad(OWScene oldScene, OWScene newScene)
{
if (IsInitialized)
{