[saco] Update CNetGame constructor

This commit is contained in:
RD42 2023-11-23 23:56:11 +08:00
parent 890e3a92a5
commit 7fe0cca7de
2 changed files with 22 additions and 6 deletions

View File

@ -1,7 +1,19 @@
#include "netgame.h"
#include "../main.h"
CNetGame::CNetGame(char *a2, int a3, char *a4, char *a5)
CNetGame::CNetGame(PCHAR szHostOrIp, int iPort,
PCHAR szPlayerName, PCHAR szPass)
{
field_3D5 = (struc_41*)calloc(1,sizeof(struc_41));
memset(m_szHostName,0,256);
memset(m_szHostOrIp,0,256);
strcpy(m_szHostName, "SA-MP");
strncpy(m_szHostOrIp, szHostOrIp, sizeof(m_szHostOrIp));
m_iPort = iPort;
m_iGameState = GAMESTATE_WAIT_CONNECT;
// TODO: CNetGame::CNetGame(...) .text:1000B930
}

View File

@ -1,4 +1,8 @@
#pragma once
#define GAMESTATE_WAIT_CONNECT 1
struct struc_41
{
char field_0;
@ -26,15 +30,15 @@ class CNetGame // size: 994
private:
int field_0;
char _gap4[44];
char field_30[257];
char field_131[257];
char m_szHostOrIp[257];
char m_szHostName[257];
char field_232;
char field_233;
char field_234;
int field_235;
int m_iPort;
int field_239;
char field_23D[400];
int field_3CD;
int m_iGameState;
int field_3D1;
struc_41 *field_3D5;
char field_3D9;