mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
improve logs
This commit is contained in:
parent
b6ac26e0e8
commit
c95bf7de34
@ -206,7 +206,7 @@ void CmdClientToServerSync(Vector3? position, Quaternion? rotation, Vector3? sca
|
|||||||
connectionToClient != null && // CUSTOM CHANGE: for the drop thing..
|
connectionToClient != null && // CUSTOM CHANGE: for the drop thing..
|
||||||
!disableSendingThisToClients) // CUSTOM CHANGE: see comment at definition
|
!disableSendingThisToClients) // CUSTOM CHANGE: see comment at definition
|
||||||
{
|
{
|
||||||
Debug.LogWarning("CmdClientToServerSync: TODO which baseline to pass in Rpc?");
|
Debug.LogWarning($"[{name}] CmdClientToServerSync: TODO which baseline to pass in Rpc?");
|
||||||
RpcServerToClientDeltaSync(0xFF, position, rotation, scale);
|
RpcServerToClientDeltaSync(0xFF, position, rotation, scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ void RpcServerToClientBaselineSync(byte baselineTick, Vector3? position, Quatern
|
|||||||
{
|
{
|
||||||
// IMPORTANT: baselineTick is a remote "frameCount & 0xff".
|
// IMPORTANT: baselineTick is a remote "frameCount & 0xff".
|
||||||
// this can be != compared but not <> compared!
|
// this can be != compared but not <> compared!
|
||||||
Debug.Log($"client received baseline #{baselineTick}");
|
Debug.Log($"[{name}] client received baseline #{baselineTick}");
|
||||||
|
|
||||||
// save the baseline including tick
|
// save the baseline including tick
|
||||||
lastDeserializedBaselineTick = baselineTick;
|
lastDeserializedBaselineTick = baselineTick;
|
||||||
@ -299,11 +299,11 @@ protected virtual void OnServerToClientDeltaSync(byte baselineTick, Vector3? pos
|
|||||||
// we don't want to put a delta onto an old baseline.
|
// we don't want to put a delta onto an old baseline.
|
||||||
if (baselineTick != lastDeserializedBaselineTick)
|
if (baselineTick != lastDeserializedBaselineTick)
|
||||||
{
|
{
|
||||||
Debug.Log($"Client discarding unreliable delta for baseline #{baselineTick} because we already received #{lastDeserializedBaselineTick}");
|
Debug.Log($"[{name}] Client discarding unreliable delta for baseline #{baselineTick} because we already received #{lastDeserializedBaselineTick}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"Client: received delta for baseline #{baselineTick}");
|
Debug.Log($"[{name}] Client: received delta for baseline #{baselineTick}");
|
||||||
|
|
||||||
// on the client, we receive rpcs for all entities.
|
// on the client, we receive rpcs for all entities.
|
||||||
// not all of them have a connectionToServer.
|
// not all of them have a connectionToServer.
|
||||||
@ -751,7 +751,7 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
|
|||||||
{
|
{
|
||||||
// save spawn message as baseline
|
// save spawn message as baseline
|
||||||
lastDeserializedBaselineTick = (byte)Time.frameCount;
|
lastDeserializedBaselineTick = (byte)Time.frameCount;
|
||||||
Debug.Log($"Spawn is used as first baseline #{lastDeserializedBaselineTick}");
|
Debug.Log($"[{name}] Spawn is used as first baseline #{lastDeserializedBaselineTick}");
|
||||||
|
|
||||||
if (syncPosition)
|
if (syncPosition)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user