mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[raknet] Implement/match RakPeer::GetAnyPlayerIDFromIndex(...)
This commit is contained in:
parent
dcfcaab9b0
commit
46575af1e9
@ -1466,6 +1466,18 @@ PlayerID RakPeer::GetPlayerIDFromIndex( int index )
|
||||
return UNASSIGNED_PLAYER_ID;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
PlayerID RakPeer::GetAnyPlayerIDFromIndex( int index )
|
||||
{
|
||||
// remoteSystemList in user thread
|
||||
if ( index >= 0 && index < maximumNumberOfPeers )
|
||||
return remoteSystemList[ index ].playerId;
|
||||
|
||||
return UNASSIGNED_PLAYER_ID;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Description:
|
||||
// Bans an IP from connecting. Banned IPs persist between connections.
|
||||
|
@ -232,6 +232,8 @@ public:
|
||||
/// \return The PlayerID
|
||||
PlayerID GetPlayerIDFromIndex( int index );
|
||||
|
||||
PlayerID GetAnyPlayerIDFromIndex( int index );
|
||||
|
||||
/// Bans an IP from connecting. Banned IPs persist between connections but are not saved on shutdown nor loaded on startup.
|
||||
/// param[in] IP Dotted IP address. Can use * as a wildcard, such as 128.0.0.* will ban all IP addresses starting with 128.0.0
|
||||
/// \param[in] milliseconds how many ms for a temporary ban. Use 0 for a permanent ban
|
||||
|
Loading…
Reference in New Issue
Block a user