MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DrawNetworkStatistics

Function DrawNetworkStatistics

engine/Poseidon/Network/NetworkMisc.cpp:2516–2653  ·  view source on GitHub ↗

Draw network statistics by types of messages

Source from the content-addressed store, hash-verified

2514void NetworkManager::DisposeBody(Person* body)
2515{
2516 if (_client)
2517 {
2518 _client->DisposeBody(body);
2519 }
2520}
2521
2522#if _ENABLE_CHEATS
2523extern bool forceControlsPaused;
2524#endif
2525
2526bool NetworkManager::IsControlsPaused()
2527{
2528#if _ENABLE_CHEATS
2529 if (forceControlsPaused)
2530 return true;
2531#endif
2532 if (_client)
2533 {
2534 return _client->IsControlsPaused();
2535 }
2536 return false;
2537}
2538
2539float NetworkManager::GetLastMsgAgeReliable()
2540{
2541 if (_client)
2542 {
2543 return _client->GetLastMsgAgeReliable();
2544 }
2545 return 0;
2546}
2547
2548// Global instance of Network Manager class
2549NetworkManager GNetworkManager;
2550
2551INetworkManager& GetNetworkManager()
2552{
2553 return GNetworkManager;
2554}
2555
2556RString NetObjToNetId(NetworkObject* obj)
2557{
2558 if (GWorld->GetMode() == GModeNetware)
2559 {
2560 NetworkId id = obj->GetNetworkId();
2561 return NetworkIdToNetId(id);
2562 }
2563 else
2564 {
2565 return RString();
2566 }
2567}
2568
2569NetworkObject* NetIdToNetObj(const char* netId)
2570{
2571 const char* idStr = strchr(netId, ':');
2572 if (idStr && GWorld->GetMode() == GModeNetware)
2573 {

Callers 1

SimulateMethod · 0.85

Calls 15

QSortFunction · 0.85
ColorClass · 0.85
GetFontIDFunction · 0.85
Line2DPixelClass · 0.85
GetServerMethod · 0.80
GetClientMethod · 0.80
GetTextWidthFMethod · 0.80
DrawTextFMethod · 0.80
toIntFunction · 0.50
Rect2DPixelClass · 0.50
Point2DFloatClass · 0.50
GetStatisticsMethod · 0.45

Tested by

no test coverage detected