diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-07 03:31:30 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-07 03:31:30 +0700 |
| commit | 988e3042e00485aa7ed3725fe7bfde1da8cf8519 (patch) | |
| tree | cf712d80b4d03eec73f935e0cce23020ddb6f5ef /Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp | |
| parent | 175fc3824e502ecd701c1da2ecd2061d77495693 (diff) | |
Remove all MSVC `__int64` (#742)
Diffstat (limited to 'Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp')
| -rw-r--r-- | Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp index a040b28b..79c9835b 100644 --- a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp +++ b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp @@ -145,7 +145,7 @@ bool SQRNetworkPlayer::IsReady() { return ( ( m_flags & SNP_FLAG_READY_MASK ) == SNP_FLAG_READY_MASK ); } - + PlayerUID SQRNetworkPlayer::GetUID() { return m_ISD.m_UID; @@ -224,7 +224,7 @@ void SQRNetworkPlayer::SendData( SQRNetworkPlayer *pPlayerTarget, const void *da { AckFlags ackFlags = ack ? e_flag_AckRequested : e_flag_AckNotRequested; // Our network is connected as a star. If we are the host, then we can send to any remote player. If we're a client, we can send only to the host. - // The host can also send to other local players, but this doesn't need to go through Rudp. + // The host can also send to other local players, but this doesn't need to go through Rudp. if( m_host ) { if( ( m_type == SNP_TYPE_HOST ) && ( pPlayerTarget->m_type == SNP_TYPE_LOCAL ) ) @@ -286,7 +286,7 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack sendBlock.end = NULL; sendBlock.current = NULL; sendBlock.ack = ackFlags; - m_sendQueue.push(sendBlock); + m_sendQueue.push(sendBlock); } else { @@ -299,13 +299,13 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack sendBlock.current = sendBlock.start; sendBlock.ack = ackFlags; memcpy( sendBlock.start, dataCurrent, dataSize); - m_sendQueue.push(sendBlock); + m_sendQueue.push(sendBlock); dataRemaining -= dataSize; dataCurrent += dataSize; } } - m_totalBytesInSendQueue += dataSize; + m_totalBytesInSendQueue += dataSize; // if the queue had something in it already, then the UDP callback will fire and call SendMoreInternal // so we don't call it here, to avoid a deadlock @@ -343,7 +343,7 @@ int SQRNetworkPlayer::WriteDataPacket(const void* data, int dataSize, AckFlags a // nothing was sent! } else - { + { assert(ret==packetSize || ret > headerSize); // we must make sure we've sent the entire packet or the header and some data at least ret -= headerSize; if(ackFlags == e_flag_AckRequested) @@ -443,7 +443,7 @@ void SQRNetworkPlayer::ReadAck() #ifndef _CONTENT_PACKAGE #ifdef PRINT_ACK_STATS - __int64 timeTaken = System::currentTimeMillis() - m_ackStats[0]; + int64_t timeTaken = System::currentTimeMillis() - m_ackStats[0]; if(timeTaken < m_minAckTime) m_minAckTime = timeTaken; if(timeTaken > m_maxAckTime) @@ -525,7 +525,7 @@ void SQRNetworkPlayer::SendMoreInternal() { keepSending = true; } - } + } else if( ( ret >= 0 ) || ( ret == sc_wouldBlockFlag ) ) { @@ -543,7 +543,7 @@ void SQRNetworkPlayer::SendMoreInternal() // Is CELL_RUDP_ERROR_WOULDBLOCK, nothing has yet been sent remainingBytes = dataSize; } - m_sendQueue.front().current = m_sendQueue.front().end - remainingBytes; + m_sendQueue.front().current = m_sendQueue.front().end - remainingBytes; } } } while (keepSending); |
