[raknet] Implement RakPeer::GetInternalID()

This commit is contained in:
RD42 2024-04-14 18:44:00 +08:00
parent 6135df699c
commit 6c038f5fb6
3 changed files with 32 additions and 4 deletions

View File

@ -7,6 +7,12 @@
RakPeer::RakPeer()
{
maximumIncomingConnections = 0;
maximumNumberOfPeers = 0;
endThreads = true;
myPlayerId = UNASSIGNED_PLAYER_ID;
incomingPasswordLength=0;
// TODO: RakPeer ctor saco .text:1003DE50 server W .text:00455140 L .text:08072970 bot W .text:00408DF0 L .text:08071AB0
}
@ -319,9 +325,14 @@ void RakPeer::vftable_98()
// TODO: RakPeer::vftable_98() (saco W: 10038730) (server W: 450230 L: 8070B60) (bot W: 404170 L: 8074FA8)
}
void RakPeer::vftable_9C()
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Description:
// Return the unique PlayerID that represents you on the the network
// Note that unlike in previous versions, this is a struct and is not sequential
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PlayerID RakPeer::GetInternalID( void ) const
{
// TODO: RakPeer::vftable_9C() (saco W: 10038780) (server W: 450280 L: 806DBC0) (bot W: 4041C0 L: 8074FD2)
return myPlayerId;
}
void RakPeer::vftable_A0()

View File

@ -113,7 +113,12 @@ public:
void vftable_90();
void vftable_94();
void vftable_98();
void vftable_9C();
//--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general--------------------------------------------------------------------------------------------
/// Return the unique address identifier that represents you on the the network and is based on your local IP / port.
/// \return the identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy
PlayerID GetInternalID( void ) const;
void vftable_A0();
void vftable_A4();
void vftable_A8();
@ -149,11 +154,18 @@ protected:
///Set this to true to terminate the Peer thread execution
volatile bool endThreads;
char _gap6[2];
///Store the maximum number of peers allowed to connect
unsigned short maximumNumberOfPeers;
///Store the maximum incoming connection allowed
unsigned short maximumIncomingConnections;
RakNet::BitStream field_B;
RakNet::BitStream field_11C;
///Local Player ID
PlayerID myPlayerId;
char incomingPassword[256];
unsigned char incomingPasswordLength;

View File

@ -110,7 +110,12 @@ public:
virtual void vftable_90()=0;
virtual void vftable_94()=0;
virtual void vftable_98()=0;
virtual void vftable_9C()=0;
//--------------------------------------------------------------------------------------------Network Functions - Functions dealing with the network in general--------------------------------------------------------------------------------------------
/// Return the unique address identifier that represents you on the the network and is based on your local IP / port.
/// \return the identifier of your system internally, which may not be how other systems see if you if you are behind a NAT or proxy
virtual PlayerID GetInternalID( void ) const=0;
virtual void vftable_A0()=0;
virtual void vftable_A4()=0;
virtual void vftable_A8()=0;