Changeset 8505 in orxonox.OLD for branches/network/src/lib
- Timestamp:
- Jun 15, 2006, 11:04:18 PM (18 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/connection_monitor.cc
r8481 r8505 151 151 152 152 float res = 0.0f; 153 153 #if 0 154 154 for ( std::map<int,int>::iterator it = packetHistory.begin(); it != packetHistory.end(); it++ ) 155 155 { … … 164 164 165 165 res *= 1000.0f; 166 166 #endif 167 168 for ( std::map<int,int>::iterator it = packetHistory.begin(); it != packetHistory.end(); it++ ) 169 { 170 res += it->second; 171 } 172 173 if ( packetHistory.size() <= 1 ) 174 res = 0.0f; 175 else 176 res /= (float)(tick - packetHistory.begin()->first); 177 178 res *= 1000.0f; 179 167 180 return res; 168 181 } -
branches/network/src/lib/network/network_stream.cc
r8502 r8505 514 514 compLength = Zip::getInstance()->zip( buf, offset, compBuf, UDP_PACKET_SIZE, dictClient ); 515 515 516 if ( compLength < 0 )516 if ( compLength <= 0 ) 517 517 { 518 518 PRINTF(1)("compression failed!\n");
Note: See TracChangeset
for help on using the changeset viewer.