dont add network behaviours

This commit is contained in:
JohnCorby 2022-01-15 03:28:10 -08:00
parent 241b972dcd
commit 9bbebf04d0
7 changed files with 19 additions and 12 deletions

View File

@ -10,6 +10,7 @@ using UnityEngine;
namespace QSB.Animation.Player namespace QSB.Animation.Player
{ {
public class AnimationSync : PlayerSyncObject public class AnimationSync : PlayerSyncObject
{ {
private RuntimeAnimatorController _suitedAnimController; private RuntimeAnimatorController _suitedAnimController;
@ -33,10 +34,10 @@ namespace QSB.Animation.Player
protected void Awake() protected void Awake()
{ {
InvisibleAnimator = gameObject.AddComponent<Animator>(); InvisibleAnimator = gameObject.GetRequiredComponent<Animator>();
NetworkAnimator = gameObject.AddComponent<NetworkAnimator>(); NetworkAnimator = gameObject.GetRequiredComponent<NetworkAnimator>();
NetworkAnimator.enabled = false; NetworkAnimator.enabled = false;
NetworkAnimator.animator = InvisibleAnimator; // NetworkAnimator.animator = InvisibleAnimator;
QSBSceneManager.OnUniverseSceneLoaded += OnUniverseSceneLoaded; QSBSceneManager.OnUniverseSceneLoaded += OnUniverseSceneLoaded;
} }

Binary file not shown.

View File

@ -1,12 +1,12 @@
ManifestFileVersion: 0 ManifestFileVersion: 0
CRC: 3354188065 CRC: 2681871399
Hashes: Hashes:
AssetFileHash: AssetFileHash:
serializedVersion: 2 serializedVersion: 2
Hash: e59d3e9e7c0cdad18bc98a1f035dcff9 Hash: e59d3e9e7c0cdad18bc98a1f035dcff9
TypeTreeHash: TypeTreeHash:
serializedVersion: 2 serializedVersion: 2
Hash: 10c572b2fffaafd2c2e3acf31b3d2fc4 Hash: a0ed95779b7375b06978e51f19fbfba7
HashAppended: 0 HashAppended: 0
ClassTypes: ClassTypes:
- Class: 1 - Class: 1

Binary file not shown.

View File

@ -1,18 +1,22 @@
ManifestFileVersion: 0 ManifestFileVersion: 0
CRC: 3050150252 CRC: 2859534538
Hashes: Hashes:
AssetFileHash: AssetFileHash:
serializedVersion: 2 serializedVersion: 2
Hash: 27daa752c69175575413d4f7ccd74e32 Hash: 7acdc0795c6c553de593d941a8fc13bf
TypeTreeHash: TypeTreeHash:
serializedVersion: 2 serializedVersion: 2
Hash: c7e0c4b68194cd411e13354a8f977a46 Hash: 14984479d6126808e669db352f4ec761
HashAppended: 0 HashAppended: 0
ClassTypes: ClassTypes:
- Class: 1 - Class: 1
Script: {instanceID: 0} Script: {instanceID: 0}
- Class: 4 - Class: 4
Script: {instanceID: 0} Script: {instanceID: 0}
- Class: 95
Script: {instanceID: 0}
- Class: 114
Script: {fileID: 1077175584, guid: b782d36837e164d4e87858bf8f2736c6, type: 3}
- Class: 114 - Class: 114
Script: {fileID: 860895539, guid: b782d36837e164d4e87858bf8f2736c6, type: 3} Script: {fileID: 860895539, guid: b782d36837e164d4e87858bf8f2736c6, type: 3}
- Class: 114 - Class: 114
@ -29,12 +33,14 @@ ClassTypes:
Script: {fileID: 78926581, guid: 27687deae413b90448366870cb0de502, type: 3} Script: {fileID: 78926581, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 114 - Class: 114
Script: {fileID: -749020886, guid: 27687deae413b90448366870cb0de502, type: 3} Script: {fileID: -749020886, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 114
Script: {fileID: -270813150, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 114
Script: {fileID: -1617191155, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 114 - Class: 114
Script: {fileID: 677635994, guid: 27687deae413b90448366870cb0de502, type: 3} Script: {fileID: 677635994, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 114 - Class: 114
Script: {fileID: 2036222940, guid: 27687deae413b90448366870cb0de502, type: 3} Script: {fileID: 2036222940, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 114
Script: {fileID: -1617191155, guid: 27687deae413b90448366870cb0de502, type: 3}
- Class: 115 - Class: 115
Script: {instanceID: 0} Script: {instanceID: 0}
SerializeReferenceClassIdentifiers: [] SerializeReferenceClassIdentifiers: []

View File

@ -57,7 +57,7 @@ namespace QSB
public static AssetBundle DebugAssetBundle { get; private set; } public static AssetBundle DebugAssetBundle { get; private set; }
public static AssetBundle TextAssetsBundle { get; private set; } public static AssetBundle TextAssetsBundle { get; private set; }
public static bool IsHost => NetworkServer.active; public static bool IsHost => NetworkServer.active;
public static bool IsInMultiplayer => NetworkManager.singleton.isNetworkActive; public static bool IsInMultiplayer => QSBNetworkManager.singleton.isNetworkActive;
public static string QSBVersion => Helper.Manifest.Version; public static string QSBVersion => Helper.Manifest.Version;
public static string GameVersion => Application.version; public static string GameVersion => Application.version;
public static GamePlatform Platform => typeof(Achievements).Assembly.GetTypes().Any(x => x.Name == "EpicEntitlementRetriever") public static GamePlatform Platform => typeof(Achievements).Assembly.GetTypes().Any(x => x.Name == "EpicEntitlementRetriever")

View File

@ -114,7 +114,7 @@ namespace QSB.TimeSync
{ {
new RequestStateResyncMessage().Send(); new RequestStateResyncMessage().Send();
CurrentState = State.Loaded; CurrentState = State.Loaded;
gameObject.GetAddComponent<PreserveTimeScale>(); gameObject.GetRequiredComponent<PreserveTimeScale>();
if (isServer) if (isServer)
{ {
SendServerTime(); SendServerTime();