| 1474 | float errorNoCoef; |
| 1475 | // Critical update |
| 1476 | bool criticalUpdate; |
| 1477 | }; |
| 1478 | |
| 1479 | // Compare player object infos by error |
| 1480 | int CmpPlayerObjects(const UpdateObjectInfo* info1, const UpdateObjectInfo* info2) |
| 1481 | { |
| 1482 | float diff = info2->error - info1->error; |
| 1483 | return sign(diff); |
| 1484 | } |
| 1485 | |
| 1486 | void NetworkServer::KickOff(int dpnid, KickOffReason reason) |
| 1487 | { |
| 1488 | RString format; |
| 1489 | switch (reason) |
| 1490 | { |
| 1491 | case KORKick: |
| 1492 | format = LocalizeString(IDS_MP_KICKED); |
| 1493 | break; |
| 1494 | case KORBan: |
| 1495 | format = LocalizeString(IDS_MP_BANNED); |
| 1496 | break; |
| 1497 | } |
| 1498 | PlayerIdentity* id = FindIdentity(dpnid); |
| 1499 | if (id) |
| 1500 | { |
| 1501 | if (id->destroy) |
| 1502 | { |
| 1503 | LOG_DEBUG(Network, "{}: KickOff in progress, new request ignored", (const char*)id->name); |
| 1504 | return; |
| 1505 | } |
| 1506 | if (format.GetLength() > 0) |
| 1507 | { |
| 1508 | RString message = Format(format, (const char*)id->name); |
nothing calls this directly
no test coverage detected