mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-13 12:40:50 +00:00
fixed player hud marker
This commit is contained in:
parent
459379d56b
commit
84c9ec5a2c
@ -16,7 +16,7 @@ namespace QSB.Player
|
|||||||
_markerTarget = new GameObject().transform;
|
_markerTarget = new GameObject().transform;
|
||||||
_markerTarget.parent = transform;
|
_markerTarget.parent = transform;
|
||||||
|
|
||||||
_markerTarget.localPosition = Vector3.up * 2;
|
_markerTarget.localPosition = Vector3.up * 0.25f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(PlayerInfo player)
|
public void Init(PlayerInfo player)
|
||||||
|
@ -62,7 +62,7 @@ namespace QSB.Player
|
|||||||
return default;
|
return default;
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugLog.DebugWrite($"Create Player : id<{id}> Stacktrace :\r\n{Environment.StackTrace}", MessageType.Info);
|
DebugLog.DebugWrite($"Create Player : id<{id}>", MessageType.Info);
|
||||||
player = new PlayerInfo(id);
|
player = new PlayerInfo(id);
|
||||||
PlayerList.Add(player);
|
PlayerList.Add(player);
|
||||||
OnAddPlayer?.Invoke(id);
|
OnAddPlayer?.Invoke(id);
|
||||||
@ -71,7 +71,7 @@ namespace QSB.Player
|
|||||||
|
|
||||||
public static void RemovePlayer(uint id)
|
public static void RemovePlayer(uint id)
|
||||||
{
|
{
|
||||||
DebugLog.DebugWrite($"Remove Player : id<{id}> Stacktrace :\r\n{Environment.StackTrace}", MessageType.Info);
|
DebugLog.DebugWrite($"Remove Player : id<{id}>", MessageType.Info);
|
||||||
PlayerList.RemoveAll(x => x.PlayerId == id);
|
PlayerList.RemoveAll(x => x.PlayerId == id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +140,8 @@ namespace QSB.Player
|
|||||||
public static void ChangePlayerVisibility(uint playerId, bool visible)
|
public static void ChangePlayerVisibility(uint playerId, bool visible)
|
||||||
{
|
{
|
||||||
var player = GetPlayer(playerId);
|
var player = GetPlayer(playerId);
|
||||||
|
player.Visible = visible;
|
||||||
|
|
||||||
if (player.Body == null)
|
if (player.Body == null)
|
||||||
{
|
{
|
||||||
DebugLog.ToConsole($"Warning - Player {playerId} has a null player model!", MessageType.Warning);
|
DebugLog.ToConsole($"Warning - Player {playerId} has a null player model!", MessageType.Warning);
|
||||||
@ -150,8 +152,6 @@ namespace QSB.Player
|
|||||||
{
|
{
|
||||||
renderer.enabled = visible;
|
renderer.enabled = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
player.Visible = visible;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlayerInfo GetClosestPlayerToWorldPoint(Vector3 worldPoint, bool includeLocalPlayer) => includeLocalPlayer
|
public static PlayerInfo GetClosestPlayerToWorldPoint(Vector3 worldPoint, bool includeLocalPlayer) => includeLocalPlayer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user