mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 09:39:56 +00:00
?
This commit is contained in:
parent
ef18f207bf
commit
187c1cb789
@ -31,8 +31,16 @@ namespace QSB.Utility
|
|||||||
|
|
||||||
#region MIRROR
|
#region MIRROR
|
||||||
|
|
||||||
public static uint GetPlayerId(this NetworkConnection conn) =>
|
public static uint GetPlayerId(this NetworkConnection conn)
|
||||||
conn.identity.netId;
|
{
|
||||||
|
if (conn == null)
|
||||||
|
{
|
||||||
|
DebugLog.ToConsole("Warning - GetPlayerId with null NetworkConnection", MessageType.Warning);
|
||||||
|
return uint.MaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return conn.identity.netId;
|
||||||
|
}
|
||||||
|
|
||||||
public static void SpawnWithServerAuthority(this GameObject go) =>
|
public static void SpawnWithServerAuthority(this GameObject go) =>
|
||||||
NetworkServer.Spawn(go, NetworkServer.localConnection);
|
NetworkServer.Spawn(go, NetworkServer.localConnection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user