mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[server] Fix strange bug in ChunkUpdateRequest
This commit is contained in:
parent
914e3abfe3
commit
1f4afe1f78
1 changed files with 5 additions and 3 deletions
|
@ -360,9 +360,10 @@ namespace Nibriboard.Client
|
|||
List<ChunkReference> missingChunks = ChunkTools.GetContainingChunkReferences(CurrentPlane, CurrentViewPort);
|
||||
missingChunks = chunkCache.FindMissing(missingChunks);
|
||||
|
||||
response.Chunks = await CurrentPlane.FetchChunks(missingChunks);
|
||||
|
||||
Send(response);
|
||||
await SendChunks(missingChunks);
|
||||
/*response.Chunks = await CurrentPlane.FetchChunks(missingChunks);
|
||||
Console.WriteLine(JsonConvert.SerializeObject(response));
|
||||
Send(response);*/
|
||||
|
||||
chunkCache.Add(missingChunks);
|
||||
}
|
||||
|
@ -488,6 +489,7 @@ namespace Nibriboard.Client
|
|||
foreach(ChunkReference chunkRef in chunkRefs)
|
||||
updateMessage.Chunks.Add(await CurrentPlane.FetchChunk(chunkRef));
|
||||
|
||||
Log.WriteLine("[NibriClient#{0}/SendChunks] Sending {1} chunks", Id, updateMessage.Chunks.Count);
|
||||
Send(updateMessage);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue