This commit is contained in:
Mister_Nebula 2020-12-16 08:40:42 +00:00
parent ac1fe4a8c6
commit f4f2e93b5e
3 changed files with 15 additions and 2 deletions

View File

@ -99,8 +99,8 @@ namespace QSB
{
var ident = go.AddComponent<QSBNetworkIdentity>();
ident.LocalPlayerAuthority = true;
ident.SetValue("m_AssetId", playerPrefab.GetComponent<NetworkIdentity>().assetId);
ident.SetValue("m_SceneId", playerPrefab.GetComponent<NetworkIdentity>().sceneId);
ident.SetValue("m_AssetId", (QSBNetworkHash128)playerPrefab.GetComponent<NetworkIdentity>().assetId);
ident.SetValue("m_SceneId", (QSBNetworkSceneId)playerPrefab.GetComponent<NetworkIdentity>().sceneId);
}
private void SetupNetworkTransform(GameObject go)

View File

@ -1,4 +1,5 @@
using System;
using UnityEngine.Networking;
namespace QuantumUNET
{
@ -121,5 +122,8 @@ namespace QuantumUNET
i15
});
}
public static explicit operator QSBNetworkHash128(NetworkHash128 v)
=> Parse(v.ToString());
}
}

View File

@ -1,5 +1,6 @@
using System;
using UnityEngine;
using UnityEngine.Networking;
namespace QuantumUNET
{
@ -32,5 +33,13 @@ namespace QuantumUNET
=> c1.m_Value != c2.m_Value;
public override string ToString() => m_Value.ToString();
public static explicit operator QSBNetworkSceneId(NetworkSceneId v)
{
return new QSBNetworkSceneId
{
m_Value = v.Value
};
}
}
}