Returns to the slot number of the player that the passed in address belongs to
| 2270 | |
| 2271 | // Returns to the slot number of the player that the passed in address belongs to |
| 2272 | int MultiMatchPlayerToAddress(network_address *from_addr) { |
| 2273 | int i; |
| 2274 | for (i = 0; i < MAX_NET_PLAYERS; i++) { |
| 2275 | if (NetPlayers[i].flags & NPF_CONNECTED) { |
| 2276 | if (!(memcmp(from_addr, &NetPlayers[i].addr, sizeof(network_address)))) |
| 2277 | return i; |
| 2278 | } |
| 2279 | } |
| 2280 | // mprintf(0,"Got a packet from unconnected player?!\n"); |
| 2281 | return -1; |
| 2282 | } |
| 2283 | |
| 2284 | // Gets info about a player |
| 2285 | // Server only |
no outgoing calls
no test coverage detected