[raknet] Update ReliabilityLayer::InitializeVariables()

This commit is contained in:
RD42 2024-04-14 22:29:40 +08:00
parent 67e6587d87
commit 608c372b11
2 changed files with 21 additions and 1 deletions

View File

@ -12,10 +12,23 @@ ReliabilityLayer::ReliabilityLayer()
InitializeVariables(); InitializeVariables();
} }
//-------------------------------------------------------------------------------------------------------
// Initialize the variables
//-------------------------------------------------------------------------------------------------------
void ReliabilityLayer::InitializeVariables( void ) void ReliabilityLayer::InitializeVariables( void )
{ {
// TODO: ReliabilityLayer::InitializeVariables // TODO: ReliabilityLayer::InitializeVariables
memset( &statistics, 0, sizeof( statistics ) );
statistics.connectionStartTime = RakNet::GetTime();
statistics.field_110 = RakNet::GetTime();
statistics.field_114 = 0;
statistics.field_118 = 0;
statistics.field_11C = RakNet::GetTime();
statistics.field_120 = 0;
statistics.field_124 = 0;
field_403 = 4;
SetPing( 1000 ); SetPing( 1000 );
} }

View File

@ -5,6 +5,7 @@
#include "SocketLayer.h" #include "SocketLayer.h"
#include "MTUSize.h" #include "MTUSize.h"
#include "RakNetStatistics.h"
class ReliabilityLayer class ReliabilityLayer
{ {
@ -33,7 +34,13 @@ private:
RakNetTime timeoutTime; // How long to wait in MS before timing someone out RakNetTime timeoutTime; // How long to wait in MS before timing someone out
char _gap2D7[1014]; char _gap2D7[4];
RakNetStatisticsStruct statistics;
unsigned int field_403;
char _gap407[710];
RakNetTimeNS ackTimeIncrement; RakNetTimeNS ackTimeIncrement;