This commit is contained in:
JohnCorby 2022-01-07 15:23:46 -08:00
parent 4780b1a1b1
commit b8fd43fda2
3 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ namespace QSB.Player
{
public abstract class PlayerSyncObject : QNetworkBehaviour
{
public uint PlayerId => NetId.Value;
public PlayerInfo Player => QSBPlayerManager.GetPlayer(PlayerId);
protected uint PlayerId => NetId.Value;
protected PlayerInfo Player => QSBPlayerManager.GetPlayer(PlayerId);
}
}

View File

@ -28,8 +28,8 @@ namespace QSB.Player
}
}
public static Action<uint> OnRemovePlayer;
public static Action<uint> OnAddPlayer;
public static Action<uint> OnRemovePlayer;
public static PlayerInfo LocalPlayer => GetPlayer(LocalPlayerId);
public static readonly List<PlayerInfo> PlayerList = new();

View File

@ -16,8 +16,8 @@ namespace QSB.Syncs
public abstract class SyncBase<T> : QNetworkTransform where T : Component
{
public PlayerInfo Player { get; private set; }
public uint PlayerId => Player.PlayerId;
protected PlayerInfo Player { get; private set; }
protected uint PlayerId => Player.PlayerId;
private bool _baseIsReady
{