[bot/saco/server] Update CNetGame constructor

This commit is contained in:
RD42 2024-04-23 22:44:38 +08:00
parent d1451f9529
commit ae590d171c
3 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#include "../main.h" #include "../main.h"
#include "../../raknet/SocketDataEncryptor.h"
char unnamed_2[63]; char unnamed_2[63];
char unnamed_5[1000][24]; char unnamed_5[1000][24];
@ -52,6 +53,8 @@ void CNetGame::Init(PCHAR szHostOrIp, int iPort,
m_pRakClient = RakNetworkFactory::GetRakClientInterface(); m_pRakClient = RakNetworkFactory::GetRakClientInterface();
SocketDataEncryptor::SetKey(iPort);
RegisterRPCs(m_pRakClient); RegisterRPCs(m_pRakClient);
RegisterScriptRPCs(m_pRakClient); RegisterScriptRPCs(m_pRakClient);

View File

@ -1,5 +1,6 @@
#include "../main.h" #include "../main.h"
#include "../../raknet/SocketDataEncryptor.h"
extern CGame *pGame; extern CGame *pGame;
extern CChatWindow *pChatWindow; extern CChatWindow *pChatWindow;
@ -48,6 +49,8 @@ CNetGame::CNetGame(PCHAR szHostOrIp, int iPort,
InitPools(); InitPools();
SocketDataEncryptor::SetKey(iPort);
RegisterRPCs(m_pRakClient); RegisterRPCs(m_pRakClient);
RegisterScriptRPCs(m_pRakClient); // Register server-side scripting RPCs. RegisterScriptRPCs(m_pRakClient); // Register server-side scripting RPCs.

View File

@ -1,5 +1,6 @@
#include "main.h" #include "main.h"
#include "../raknet/SocketDataEncryptor.h"
int CanFileBeOpenedForReading(char * filename); int CanFileBeOpenedForReading(char * filename);
@ -65,7 +66,7 @@ CNetGame::CNetGame()
// Setup RakNet // Setup RakNet
m_pRak = RakNetworkFactory::GetRakServerInterface(); m_pRak = RakNetworkFactory::GetRakServerInterface();
SocketDataEncryptor::SetKey(dwPort);