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

Function FindUnit

engine/Poseidon/Network/NetworkClientOnMessage.cpp:98–112  ·  view source on GitHub ↗

Check if given unit is in list of units

Source from the content-addressed store, hash-verified

96
97// NetworkClient::OnMessage and its helpers, split out of NetworkClient.cpp
98// to keep that translation unit under the size threshold.
99extern const char* GameStateNames[];
100#define BODIES_ON_BOT_CLIENT 10
101#define BODIES_ON_CLIENTS 20
102
103static int NetworkPlayerFaceTransferOwner(RString path)
104{
105 const char prefix[] = "tmp/players/";
106 const int prefixLen = static_cast<int>(sizeof(prefix) - 1);
107 const char* data = path;
108 if (strncmp(data, prefix, prefixLen) != 0)
109 {
110 return -1;
111 }
112
113 const char* owner = data + prefixLen;
114 const char* slash = strchr(owner, '/');
115 if (!slash)

Callers 2

OnMessageMethod · 0.85
FindSignMethod · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected