mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[raknet] Match RakPeer::GetStatistics(...)
This commit is contained in:
parent
c17f510bb7
commit
4476060360
@ -2340,7 +2340,7 @@ RakNetStatisticsStruct * const RakPeer::GetStatistics( const PlayerID playerId )
|
||||
{
|
||||
if (playerId==UNASSIGNED_PLAYER_ID)
|
||||
{
|
||||
bool firstWrite=false;
|
||||
bool firstWrite=true;
|
||||
static RakNetStatisticsStruct sum;
|
||||
RakNetStatisticsStruct *systemStats;
|
||||
// Return a crude sum
|
||||
@ -2350,8 +2350,11 @@ RakNetStatisticsStruct * const RakPeer::GetStatistics( const PlayerID playerId )
|
||||
{
|
||||
systemStats=remoteSystemList[ i ].reliabilityLayer.GetStatistics();
|
||||
|
||||
if (firstWrite==false)
|
||||
if (firstWrite==true)
|
||||
{
|
||||
memcpy(&sum, systemStats, sizeof(RakNetStatisticsStruct));
|
||||
firstWrite=false;
|
||||
}
|
||||
else
|
||||
sum+=*systemStats;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user