]> git.localhorst.tv Git - blank.git/commitdiff
don't send chunks and entities simultaneously while skipping
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 27 Oct 2015 16:46:16 +0000 (17:46 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Tue, 27 Oct 2015 16:46:16 +0000 (17:46 +0100)
src/server/net.cpp

index cd4f2003c359b1896adbf435430eae8b68fd3562..aa1bdeb89448c46c757f6a4f47eb283c730ce581 100644 (file)
@@ -398,6 +398,11 @@ void ClientConnection::CheckChunkQueue() {
                old_base = PlayerChunks().Base();
                sort(chunk_queue.begin(), chunk_queue.end(), QueueCompare(old_base));
        }
+       // if we have packet skip enabled and just pushed an entity
+       // update, don't also send chunk data
+       if (NetStat().SuggestedPacketSkip() > 0 && entity_updates_skipped == 0) {
+               return;
+       }
        if (transmitter.Transmitting()) {
                transmitter.Transmit();
                return;