Skip to content

Commit

Permalink
fix some skins not syncing on join
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Nov 13, 2023
1 parent ddd740b commit 861962f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
6 changes: 4 additions & 2 deletions QSB/Player/Messages/PlayerInformationMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ public override void OnReceiveRemote()
{
player.UpdateObjectsFromStates();
player.HelmetAnimator.SetHelmetInstant(HelmetOn);
player.Camera.fieldOfView = FieldOfView;
});

Delay.RunWhen(() => player.Body != null, () =>
{
var REMOTE_Traveller_HEA_Player_v2 = player.Body.transform.Find("REMOTE_Traveller_HEA_Player_v2");
BodyCustomization.BodyCustomizer.Instance.CustomizeRemoteBody(REMOTE_Traveller_HEA_Player_v2.gameObject, player.HelmetAnimator.FakeHead.gameObject, SkinType, JetpackType);

player.Camera.fieldOfView = FieldOfView;
});

player.State = ClientState;
Expand Down
23 changes: 1 addition & 22 deletions QSB/Player/PlayerInfoParts/Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,7 @@ public OWCamera Camera

public GameObject CameraBody { get; set; }

public GameObject Body
{
get
{
if (_body == null && IsReady)
{
DebugLog.ToConsole($"Warning - {PlayerId}.Body is null!", MessageType.Warning);
}

return _body;
}
set
{
if (value == null)
{
DebugLog.ToConsole($"Warning - Setting {PlayerId}.Body to null.", MessageType.Warning);
}

_body = value;
}
}
private GameObject _body;
public GameObject Body { get; set; }

/// <summary>
/// remote light sensor is disabled.
Expand Down

0 comments on commit 861962f

Please sign in to comment.