forked from cafeberry/cafeberry
update lcemp networking
This commit is contained in:
@@ -329,6 +329,10 @@ void ServerPlayer::doTickA()
|
||||
// 4J - split off the chunk sending bit of the tick here from ::doTick so we can do this exactly once per player per server tick
|
||||
void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
|
||||
{
|
||||
#if defined(_WINDOWS64) || defined(DISABLE_PSN) || defined(_DISABLE_XBLIVE)
|
||||
for (int _w64cs = 0; _w64cs < 4; _w64cs++)
|
||||
{
|
||||
#endif
|
||||
// printf("[%d] %s: sendChunks: %d, empty: %d\n",tickCount, connection->getNetworkPlayer()->GetUID().getOnlineID(),sendChunks,chunksToSend.empty());
|
||||
if (!chunksToSend.empty())
|
||||
{
|
||||
@@ -367,6 +371,17 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(_WINDOWS64)
|
||||
if( dontDelayChunks ||
|
||||
((connection->countDelayedPackets() < 16 )&&
|
||||
(g_NetworkManager.GetHostPlayer()->GetSendQueueSizeMessages( NULL, true ) < 16 )&&
|
||||
!connection->done) )
|
||||
{
|
||||
lastBrupSendTickCount = tickCount;
|
||||
okToSend = true;
|
||||
MinecraftServer::s_slowQueuePacketSent = true;
|
||||
}
|
||||
#else
|
||||
bool canSendToPlayer = MinecraftServer::chunkPacketManagement_CanSendTo(connection->getNetworkPlayer());
|
||||
|
||||
// app.DebugPrintf(">>> %d\n", canSendToPlayer);
|
||||
@@ -408,6 +423,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
|
||||
{
|
||||
// app.DebugPrintf(" - <NOT OK>\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (okToSend)
|
||||
@@ -485,6 +501,9 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(_WINDOWS64) || defined(DISABLE_PSN) || defined(_DISABLE_XBLIVE)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ServerPlayer::doTickB()
|
||||
|
||||
Reference in New Issue
Block a user