Game Development Community

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
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).

#1
09/02/2011 (9:32 am)
I've gone ahead and logged this bug under THREED-2524. As always thank you Fyodor.
#2
10/11/2011 (11:06 am)
Fixed in 1.2