mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 15:41:01 +00:00
make this work
This commit is contained in:
parent
9bbebf04d0
commit
a09ee8ac99
@ -81,14 +81,18 @@ namespace Mirror
|
||||
lastIntParameters = new int[parameters.Length];
|
||||
lastFloatParameters = new float[parameters.Length];
|
||||
lastBoolParameters = new bool[parameters.Length];
|
||||
|
||||
animationHash = new int[animator.layerCount];
|
||||
transitionHash = new int[animator.layerCount];
|
||||
layerWeight = new float[animator.layerCount];
|
||||
}
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
// QSB: move array init here since layerCount will not be 0
|
||||
if (animationHash == null)
|
||||
{
|
||||
animationHash = new int[animator.layerCount];
|
||||
transitionHash = new int[animator.layerCount];
|
||||
layerWeight = new float[animator.layerCount];
|
||||
}
|
||||
|
||||
if (!SendMessagesAllowed)
|
||||
return;
|
||||
|
||||
|
@ -295,7 +295,7 @@ namespace Mirror
|
||||
// NetworkBehaviour components are initialized in Awake once.
|
||||
// Changing them at runtime would get client & server out of sync.
|
||||
// BUT internal so tests can add them after creating the NetworkIdentity
|
||||
internal void InitializeNetworkBehaviours()
|
||||
public void InitializeNetworkBehaviours()
|
||||
{
|
||||
// Get all NetworkBehaviours
|
||||
// (never null. GetComponents returns [] if none found)
|
||||
|
@ -34,10 +34,13 @@ namespace QSB.Animation.Player
|
||||
|
||||
protected void Awake()
|
||||
{
|
||||
InvisibleAnimator = gameObject.GetRequiredComponent<Animator>();
|
||||
NetworkAnimator = gameObject.GetRequiredComponent<NetworkAnimator>();
|
||||
InvisibleAnimator = gameObject.AddComponent<Animator>();
|
||||
gameObject.SetActive(false);
|
||||
NetworkAnimator = gameObject.AddComponent<NetworkAnimator>();
|
||||
NetworkAnimator.animator = InvisibleAnimator;
|
||||
gameObject.SetActive(true);
|
||||
netIdentity.InitializeNetworkBehaviours();
|
||||
NetworkAnimator.enabled = false;
|
||||
// NetworkAnimator.animator = InvisibleAnimator;
|
||||
|
||||
QSBSceneManager.OnUniverseSceneLoaded += OnUniverseSceneLoaded;
|
||||
}
|
||||
|
Binary file not shown.
@ -1,12 +1,12 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 2681871399
|
||||
CRC: 3354188065
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: e59d3e9e7c0cdad18bc98a1f035dcff9
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: a0ed95779b7375b06978e51f19fbfba7
|
||||
Hash: 10c572b2fffaafd2c2e3acf31b3d2fc4
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
|
Binary file not shown.
@ -1,22 +1,18 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 2859534538
|
||||
CRC: 3050150252
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 7acdc0795c6c553de593d941a8fc13bf
|
||||
Hash: e3779728ade70a83cb691ff38a942b27
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 14984479d6126808e669db352f4ec761
|
||||
Hash: 685965bc8b6c3e44c52353fb71b334e8
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
Script: {instanceID: 0}
|
||||
- Class: 4
|
||||
Script: {instanceID: 0}
|
||||
- Class: 95
|
||||
Script: {instanceID: 0}
|
||||
- Class: 114
|
||||
Script: {fileID: 1077175584, guid: b782d36837e164d4e87858bf8f2736c6, type: 3}
|
||||
- Class: 114
|
||||
Script: {fileID: 860895539, guid: b782d36837e164d4e87858bf8f2736c6, type: 3}
|
||||
- Class: 114
|
||||
@ -33,8 +29,6 @@ ClassTypes:
|
||||
Script: {fileID: 78926581, guid: 27687deae413b90448366870cb0de502, type: 3}
|
||||
- Class: 114
|
||||
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
|
||||
|
@ -114,7 +114,8 @@ namespace QSB.TimeSync
|
||||
{
|
||||
new RequestStateResyncMessage().Send();
|
||||
CurrentState = State.Loaded;
|
||||
gameObject.GetRequiredComponent<PreserveTimeScale>();
|
||||
gameObject.GetAddComponent<PreserveTimeScale>();
|
||||
netIdentity.InitializeNetworkBehaviours();
|
||||
if (isServer)
|
||||
{
|
||||
SendServerTime();
|
||||
|
Loading…
x
Reference in New Issue
Block a user