Packet catchup and scene indexes in packets

This commit is contained in:
Aaro Varis
2025-03-09 22:32:47 +02:00
parent 20a624fb0f
commit 3b0c26a687
7 changed files with 94 additions and 15 deletions

View File

@@ -78,6 +78,7 @@ namespace BoneSync.Player
public void UpdatePlayerSync(PlayerSyncInfo playerSyncInfo)
{
EnsurePlayerRig();
//MelonLogger.Msg("Updating player sync for " + _ownerId);
playerRig.transform.position = playerSyncInfo.rootPos;
@@ -224,13 +225,7 @@ namespace BoneSync.Player
// Catch errors so other players arent broken
try
{
EnsurePlayerRig();
//Re-Apply playermodel if unloaded
//if ((!currentSkinBundle || !currentSkinObject) && isCustomSkinned)
// PlayerSkinLoader.ApplyPlayermodel(this, currentSkinPath);
// Prevent exceptions if we are in the middle of deleting a playermodel
if (!animator)
return;
if (body == null || characterAnimationManager == null || animator == null || playerRig == null) return;
animator.Update(Time.fixedDeltaTime);
characterAnimationManager.OnLateUpdate();