aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
diff options
context:
space:
mode:
authordaoge <3523206925@qq.com>2026-03-03 03:04:10 +0800
committerGitHub <noreply@github.com>2026-03-03 03:04:10 +0800
commitb3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch)
tree267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
parent84c31a2331f7a0ec85b9d438992e244f60e5020f (diff)
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp')
-rw-r--r--Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp b/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
index 37e24f7a..386a0206 100644
--- a/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
+++ b/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
@@ -12,7 +12,7 @@ unsigned char NetworkPlayerXbox::GetSmallId()
return m_qnetPlayer->GetSmallId();
}
-void NetworkPlayerXbox::SendData(INetworkPlayer *player, const void *pvData, int dataSize, bool lowPriority)
+void NetworkPlayerXbox::SendData(INetworkPlayer *player, const void *pvData, int dataSize, bool lowPriority, bool ack)
{
DWORD flags;
flags = QNET_SENDDATA_RELIABLE | QNET_SENDDATA_SEQUENTIAL;
@@ -20,6 +20,11 @@ void NetworkPlayerXbox::SendData(INetworkPlayer *player, const void *pvData, int
m_qnetPlayer->SendData(((NetworkPlayerXbox *)player)->m_qnetPlayer, pvData, dataSize, flags);
}
+int NetworkPlayerXbox::GetOutstandingAckCount()
+{
+ return 0;
+}
+
bool NetworkPlayerXbox::IsSameSystem(INetworkPlayer *player)
{
return ( m_qnetPlayer->IsSameSystem(((NetworkPlayerXbox *)player)->m_qnetPlayer) == TRUE );
@@ -119,3 +124,19 @@ IQNetPlayer *NetworkPlayerXbox::GetQNetPlayer()
return m_qnetPlayer;
}
+void NetworkPlayerXbox::SentChunkPacket()
+{
+ m_lastChunkPacketTime = System::currentTimeMillis();
+}
+
+int NetworkPlayerXbox::GetTimeSinceLastChunkPacket_ms()
+{
+ // If we haven't ever sent a packet, return maximum
+ if( m_lastChunkPacketTime == 0 )
+ {
+ return INT_MAX;
+ }
+
+ __int64 currentTime = System::currentTimeMillis();
+ return (int)( currentTime - m_lastChunkPacketTime );
+} \ No newline at end of file