| 2464 | if (!_finite(error)) |
| 2465 | { |
| 2466 | RptF("Client: Infinite error catched on %s", (const char*)oInfo.object->GetDebugName()); |
| 2467 | } |
| 2468 | } |
| 2469 | saturateMax(maxError, error); |
| 2470 | sumError += error; |
| 2471 | } |
| 2472 | } |
| 2473 | } |
| 2474 | /* |
| 2475 | #if _ENABLE_CHEATS |
| 2476 | if (outputDiags == 1 && sumError > 0) |
| 2477 | { |
| 2478 | char buf1[32], buf2[32]; |
| 2479 | sprintf |
| 2480 | ( |
| 2481 | output + strlen(output), |
| 2482 | "Err %s / %s", |
| 2483 | FormatVal(maxError, buf1), |
| 2484 | FormatVal(sumError, buf2) |
| 2485 | ); |
| 2486 | GlobalShowMessage(1000, output); |
| 2487 | } |
| 2488 | #endif |
| 2489 | */ |
| 2490 | |
| 2491 | // sort local objects by errors |
| 2492 | QSort(objects.Data(), objects.Size(), CmpLocalObjects); |
| 2493 | } |
| 2494 | |
| 2495 | void NetworkClient::SendMessages() |
| 2496 | { |
| 2497 | // calculate limits |
| 2498 | int nMsg = 0, nBytes = 0; |
| 2499 | int nMsgMax, nBytesMax; |
| 2500 | |
| 2501 | EstimateBandwidth(nMsgMax, nBytesMax); |
| 2502 | |
| 2503 | // send enqueued guaranteed messages |
| 2504 | |
| 2505 | const int nMsgMaxGuaranteed = nMsgMax; |
| 2506 | const int nBytesMaxGuaranteed = nBytesMax; |
| 2507 | |
| 2508 | int maxSize = MaxSizeGuaranteed; |
| 2509 | while (_messageQueue.Size() > 0) |
| 2510 | { |
| 2511 | if (nMsg >= nMsgMaxGuaranteed || nBytes >= nBytesMaxGuaranteed) |
| 2512 | { |
| 2513 | /* |
| 2514 | #if _ENABLE_CHEATS |
| 2515 | if (outputDiags == 1) |
| 2516 | { |
| 2517 | strcat(output, "Limit reached"); |
| 2518 | GlobalShowMessage(1000, output); |
| 2519 | } |
| 2520 | #endif |
| 2521 | */ |
| 2522 | break; |
| 2523 | } |
nothing calls this directly
no test coverage detected