| 2365 | #endif |
| 2366 | */ |
| 2367 | if (_connectionQuality < CQPoor) |
| 2368 | { |
| 2369 | if (latencyMS >= 500) |
| 2370 | { |
| 2371 | _connectionQuality = CQPoor; |
| 2372 | } |
| 2373 | } |
| 2374 | } |
| 2375 | int nPlayers = _identities.Size() - 1; |
| 2376 | if (nPlayers > 0) |
| 2377 | { |
| 2378 | saturate(nBytesMax, MinBandwidth / 8, MaxBandwidth / 8); |
| 2379 | } |
| 2380 | |
| 2381 | nBytesMax = toInt(0.001 * GEngine->GetAvgFrameDuration() * nBytesMax); |
| 2382 | |
| 2383 | nBytesMax -= nBytes; |
| 2384 | nMsgMax -= nMsg; |
| 2385 | |
| 2386 | #if _ENABLE_CHEATS |
| 2387 | if (outputLogs) |
| 2388 | LOG_DEBUG(Network, "Client: Limit ({}, {})", nBytesMax, nMsgMax); |
| 2389 | /* |
| 2390 | if (outputDiags == 1) sprintf(output + strlen(output), "Limit (%d, %d); ", nBytesMax, nMsgMax); |
| 2391 | */ |
| 2392 | #endif |
| 2393 | } |
| 2394 | } |
| 2395 | |
| 2396 | void NetworkClient::CreateObjectsList(AutoArray<UpdateLocalObjectInfo, MemAllocSA>& objects) |
| 2397 | { |
| 2398 | float maxError = 0, sumError = 0; |
| 2399 | for (int i = 0; i < _localObjects.Size(); i++) |
| 2400 | { |
| 2401 | NetworkLocalObjectInfo& oInfo = _localObjects[i]; |
| 2402 | |
| 2403 | for (int j = NMCUpdateFirst; j < NMCUpdateN; j++) |
| 2404 | { |
| 2405 | NetworkUpdateInfo& info = oInfo.updates[j]; |
| 2406 | |
| 2407 | float error; |
| 2408 | if (info.lastCreatedMsg) |
| 2409 | { |
| 2410 | // message on the way |
| 2411 | continue; |
| 2412 | } |
| 2413 | else |
| 2414 | { |
| 2415 | NetworkMessageType type = oInfo.object->GetNMType((NetworkMessageClass)j); |
| 2416 | if (type == NMTNone) |
| 2417 | { |
| 2418 | continue; |
| 2419 | } |
| 2420 | |
| 2421 | if (!info.lastSentMsg) |
| 2422 | { |
| 2423 | error = FLT_MAX; |
| 2424 | } |
nothing calls this directly
no test coverage detected