mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-27 00:40:12 +00:00
playerid
This commit is contained in:
parent
aaff217c36
commit
862d6949c0
@ -4,6 +4,7 @@ using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace QSB
|
||||
{
|
||||
@ -11,7 +12,7 @@ namespace QSB
|
||||
{
|
||||
public const int NetworkObjectCount = 4;
|
||||
|
||||
public static uint LocalPlayerId => PlayerTransformSync.LocalInstance.netId.Value;
|
||||
public static uint LocalPlayerId => PlayerTransformSync.LocalInstance.GetComponent<NetworkIdentity>()?.netId.Value ?? 0;
|
||||
public static PlayerInfo LocalPlayer => GetPlayer(LocalPlayerId);
|
||||
public static List<PlayerInfo> PlayerList { get; } = new List<PlayerInfo>();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user