Skip to content

Commit

Permalink
Send the last chunk after iterating over everything
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowJonathan committed Dec 3, 2024
1 parent afd1b3d commit 63df4e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cove/Server/Server.Packet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void OnNetworkPacket(byte[] packet, CSteamID sender)
{
long canvasID = (long)packetInfo["canvas_id"];
Chalk.ChalkCanvas canvas = chalkCanvas.Find(c => c.canvasID == canvasID);

if (canvas == null)
{
Console.WriteLine($"Creating new canvas: {canvasID}");
Expand Down Expand Up @@ -203,6 +203,8 @@ internal void SendStagedChalkPackets(CSteamID recipient)
i++;
}

chunks.Add(chunk);

for (int index = 0; index < chunks.Count; index++)
{
Dictionary<string, object> chalkPacket = new Dictionary<string, object> { { "type", "chalk_packet" }, { "canvas_id", canvas.canvasID }, { "data", chunks[index] } };
Expand Down

0 comments on commit 63df4e3

Please sign in to comment.