This commit is contained in:
JohnCorby 2022-01-21 19:31:48 -08:00
parent c6d0b87c1b
commit 7f9cb3662f
2 changed files with 11 additions and 11 deletions

View File

@ -54,6 +54,16 @@ namespace QSB.Player.TransformSync
public override void OnStartLocalPlayer() => LocalInstance = this;
public override void OnStopClient()
{
// TODO : Maybe move this to a leave event...? Would ensure everything could finish up before removing the player
QSBPlayerManager.OnRemovePlayer?.Invoke(Player);
base.OnStopClient();
Player.HudMarker?.Remove();
QSBPlayerManager.PlayerList.Remove(Player);
DebugLog.DebugWrite($"Remove Player : id<{Player.PlayerId}>", MessageType.Info);
}
protected override void Init()
{
base.Init();
@ -76,16 +86,6 @@ namespace QSB.Player.TransformSync
}
}
public override void OnStopClient()
{
// TODO : Maybe move this to a leave event...? Would ensure everything could finish up before removing the player
QSBPlayerManager.OnRemovePlayer?.Invoke(Player);
base.OnStopClient();
Player.HudMarker?.Remove();
QSBPlayerManager.PlayerList.Remove(Player);
DebugLog.DebugWrite($"Remove Player : id<{Player.PlayerId}>", MessageType.Info);
}
protected override Transform InitLocalTransform()
{
SectorDetector.Init(Locator.GetPlayerSectorDetector(), TargetType.Player);

View File

@ -92,7 +92,7 @@ namespace QSB.Syncs
if (!AllowNullReferenceTransform && !ReferenceTransform)
{
DebugLog.ToConsole($"Warning - {LogName}'s ReferenceTransform is null. AttachedObject:{AttachedTransform.name}", MessageType.Warning);
DebugLog.ToConsole($"Warning - {LogName}'s ReferenceTransform is null.", MessageType.Warning);
return false;
}