Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions com.unity.multiplayer.mlapi/Runtime/Core/SnapshotSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,6 @@ public void ReadSnapshot(ulong clientId, Stream snapshotStream)
snapshot.ReadIndex(reader);
snapshot.ReadBuffer(reader, snapshotStream);
}

SendAck(clientId, snapshotTick);
}

public void ReadAck(ulong clientId, Stream snapshotStream)
Expand All @@ -485,21 +483,6 @@ public void ReadAck(ulong clientId, Stream snapshotStream)
}
}

public void SendAck(ulong clientId, int tick)
{
var context = m_NetworkManager.MessageQueueContainer.EnterInternalCommandContext(
MessageQueueContainer.MessageType.SnapshotAck, NetworkChannel.SnapshotExchange,
new[] { clientId }, NetworkUpdateLoop.UpdateStage);

if (context != null)
{
using (var nonNullContext = (InternalCommandContext)context)
{
nonNullContext.NetworkWriter.WriteInt32Packed(tick);
}
}
}

// todo --M1--
// This is temporary debugging code. Once the feature is complete, we can consider removing it
// But we could also leave it in in debug to help developers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,6 @@ internal static void HandleSnapshot(ulong clientId, Stream messageStream)
NetworkManager.Singleton.SnapshotSystem.ReadSnapshot(clientId, messageStream);
}

internal static void HandleAck(ulong clientId, Stream messageStream)
{
NetworkManager.Singleton.SnapshotSystem.ReadAck(clientId, messageStream);
}

public void HandleAllClientsSwitchSceneCompleted(ulong clientId, Stream stream)
{
using (var reader = PooledNetworkReader.Get(stream))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public enum MessageType
NamedMessage,
ServerLog,
SnapshotData,
SnapshotAck,
NetworkVariableDelta,
SwitchScene,
ClientSwitchSceneCompleted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ public void ProcessMessage(in MessageFrameItem item)
case MessageQueueContainer.MessageType.SnapshotData:
InternalMessageHandler.HandleSnapshot(item.NetworkId, item.NetworkBuffer);
break;
case MessageQueueContainer.MessageType.SnapshotAck:
InternalMessageHandler.HandleAck(item.NetworkId, item.NetworkBuffer);
break;
case MessageQueueContainer.MessageType.NetworkVariableDelta:
m_NetworkManager.MessageHandler.HandleNetworkVariableDelta(item.NetworkId, item.NetworkBuffer);
break;
Expand Down