Skip to content

Commit

Permalink
Merge pull request #35 from ShadowJonathan/fix-chalk
Browse files Browse the repository at this point in the history
Send the last chunk after iterating over everything
  • Loading branch information
DrMeepso authored Dec 3, 2024
2 parents afd1b3d + 63df4e3 commit b7fdc8a
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 b7fdc8a

Please sign in to comment.