Check if given unit is in list of units
| 96 | |
| 97 | // NetworkClient::OnMessage and its helpers, split out of NetworkClient.cpp |
| 98 | // to keep that translation unit under the size threshold. |
| 99 | extern const char* GameStateNames[]; |
| 100 | #define BODIES_ON_BOT_CLIENT 10 |
| 101 | #define BODIES_ON_CLIENTS 20 |
| 102 | |
| 103 | static 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) |