log baseline set

This commit is contained in:
miwarnec 2024-11-04 11:39:09 +01:00
parent 724d3d4a8b
commit 2ae310f16c

View File

@ -347,6 +347,8 @@ void RpcServerToClientBaseline_PositionRotation(byte baselineTick, Vector3 posit
lastDeserializedBaselinePosition = position;
lastDeserializedBaselineRotation = rotation;
Debug.Log($"{name} RpcServerToClientBaseline sets new baseline := {baselineTick}");
// debug draw: baseline
if (debugDraw) Debug.DrawLine(position, position + Vector3.up, Color.yellow, 10f);
@ -366,6 +368,8 @@ void RpcServerToClientBaseline_Position(byte baselineTick, Vector3 position)
lastDeserializedBaselineTick = baselineTick;
lastDeserializedBaselinePosition = position;
Debug.Log($"{name} RpcServerToClientBaseline sets new baseline := {baselineTick}");
// debug draw: baseline
if (debugDraw) Debug.DrawLine(position, position + Vector3.up, Color.yellow, 10f);
@ -385,6 +389,8 @@ void RpcServerToClientBaseline_Rotation(byte baselineTick, Quaternion rotation)
lastDeserializedBaselineTick = baselineTick;
lastDeserializedBaselineRotation = rotation;
Debug.Log($"{name} RpcServerToClientBaseline sets new baseline := {baselineTick}");
// if baseline counts as delta, insert it into snapshot buffer too
if (baselineIsDelta)
OnServerToClientDeltaSync(baselineTick, Vector3.zero, rotation);//, Vector3.zero);//, scale);
@ -1079,6 +1085,8 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
Vector3 position = Vector3.zero;
Quaternion rotation = Quaternion.identity;
Debug.Log($"{name} OnDeserialize sets new baseline := {lastDeserializedBaselineTick}");
if (syncPosition)
{
position = reader.ReadVector3();