T3D 1.1 Final - $Stats::netBitsSent reports wrong data - RESOLVED
by Fyodor -bank- Osokin · in Torque 3D Professional · 09/02/2011 (1:57 am) · 2 replies
Build: Torque 3D 1.1
Platform: Any/All
Target: Network usage statistics
Issue: The network statistics contains wrong data for the "$Stats::netBitsSent".
Fix:
Inside the Net::Error NetConnection::sendPacket(BitStream *stream)
replace
Platform: Any/All
Target: Network usage statistics
Issue: The network statistics contains wrong data for the "$Stats::netBitsSent".
Fix:
Inside the Net::Error NetConnection::sendPacket(BitStream *stream)
replace
gNetBitsSent = stream->getStreamSize();with:
gNetBitsSent = stream->getPosition();The real issue is, that the getStreamSize() is a total size of buffer (allocated) and we need to retrieve how much data is really in (getPosition() is a correct method as it returns the real amount of data written to the buffer for us to sent over the network).
About the author
Game developer.
Torque 3D Owner Christopher Tauscher
Default Studio