| 1948 | } |
| 1949 | |
| 1950 | int PlayerManager::GetClientFromSerial(unsigned int serial) |
| 1951 | { |
| 1952 | serial_t s; |
| 1953 | s.value = serial; |
| 1954 | |
| 1955 | int client = s.bits.index; |
| 1956 | |
| 1957 | IGamePlayer *pPlayer = GetGamePlayer(client); |
| 1958 | |
| 1959 | if (!pPlayer) |
| 1960 | { |
| 1961 | return 0; |
| 1962 | } |
| 1963 | |
| 1964 | if (serial == pPlayer->GetSerial()) |
| 1965 | { |
| 1966 | return client; |
| 1967 | } |
| 1968 | |
| 1969 | return 0; |
| 1970 | } |
| 1971 | |
| 1972 | #if SOURCE_ENGINE >= SE_ORANGEBOX |
| 1973 | void CmdMaxplayersCallback(const CCommand &command) |
no test coverage detected