mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 06:39:55 +00:00
?
This commit is contained in:
parent
ef18f207bf
commit
187c1cb789
@ -31,8 +31,16 @@ namespace QSB.Utility
|
||||
|
||||
#region MIRROR
|
||||
|
||||
public static uint GetPlayerId(this NetworkConnection conn) =>
|
||||
conn.identity.netId;
|
||||
public static uint GetPlayerId(this NetworkConnection conn)
|
||||
{
|
||||
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) =>
|
||||
NetworkServer.Spawn(go, NetworkServer.localConnection);
|
||||
|
Loading…
x
Reference in New Issue
Block a user