mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
add comments
This commit is contained in:
parent
80387ffa03
commit
92d4429c55
@ -940,6 +940,7 @@ internal void OnSerializeAllSafely(bool initialState, NetworkWriter ownerWriter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get cached serialization for this tick (or serialize if none yet)
|
// get cached serialization for this tick (or serialize if none yet)
|
||||||
|
// IMPORTANT: needs FRAME TIME which doesn't change during THIS FRAME!
|
||||||
internal NetworkIdentitySerialization GetSerializationAtTick(float tickTimeStamp)
|
internal NetworkIdentitySerialization GetSerializationAtTick(float tickTimeStamp)
|
||||||
{
|
{
|
||||||
// serialize fresh if tick is newer than last one
|
// serialize fresh if tick is newer than last one
|
||||||
|
@ -1432,6 +1432,7 @@ public static void RebuildObservers(NetworkIdentity identity, bool initialize)
|
|||||||
static NetworkWriter GetEntitySerializationForConnection(NetworkIdentity identity, NetworkConnectionToClient connection)
|
static NetworkWriter GetEntitySerializationForConnection(NetworkIdentity identity, NetworkConnectionToClient connection)
|
||||||
{
|
{
|
||||||
// get serialization for this entity (cached)
|
// get serialization for this entity (cached)
|
||||||
|
// IMPORTANT: needs FRAME TIME which doesn't change during THIS FRAME!
|
||||||
NetworkIdentitySerialization serialization = identity.GetSerializationAtTick(Time.time);
|
NetworkIdentitySerialization serialization = identity.GetSerializationAtTick(Time.time);
|
||||||
|
|
||||||
// is this entity owned by this connection?
|
// is this entity owned by this connection?
|
||||||
|
Loading…
Reference in New Issue
Block a user