[saco] Implement CPickupPool constructor

This commit is contained in:
RD42 2024-02-07 23:59:04 +08:00
parent fea970deef
commit 1002c13453
6 changed files with 55 additions and 1 deletions

View File

@ -31,6 +31,7 @@ typedef struct _GAME_SETTINGS {
#include "net/netrpc.h"
#include "net/vehiclepool.h"
#include "net/pickuppool.h"
#include "net/netgame.h"
#include "net/scriptrpc.h"

View File

@ -35,6 +35,7 @@ void CNetGame::InitPools()
m_pPools->pPlayerPool = new CPlayerPool();
m_pPools->pVehiclePool = new CVehiclePool();
m_pPools->pPickupPool = new CPickupPool();
}
DWORD CNetGame::GetTime()

View File

@ -28,7 +28,8 @@ struct struc_41
typedef struct _NETGAME_POOLS {
CVehiclePool *pVehiclePool;
CPlayerPool *pPlayerPool;
char _gap0[28];
CPickupPool *pPickupPool;
char _gap0[24];
} NETGAME_POOLS;
class CNetGame // size: 994

18
saco/net/pickuppool.cpp Normal file
View File

@ -0,0 +1,18 @@
#include "../main.h"
//----------------------------------------------------
CPickupPool::CPickupPool()
{
memset(field_F004, 0, sizeof(field_F004));
field_0 = 0;
for (int i = 0; i < MAX_PICKUPS; i++)
{
field_4[i] = 0;
field_8004[i] = 0;
field_4004[i] = 0;
}
}
//----------------------------------------------------

27
saco/net/pickuppool.h Normal file
View File

@ -0,0 +1,27 @@
#pragma once
#define MAX_PICKUPS 4096
//----------------------------------------------------
class CPickupPool
{
private:
int field_0;
int field_4[MAX_PICKUPS];
int field_4004[MAX_PICKUPS];
int field_8004[MAX_PICKUPS];
char _gapC004[12288];
char field_F004[81920];
public:
CPickupPool();
};
//----------------------------------------------------

View File

@ -258,6 +258,12 @@
<File
RelativePath=".\net\netrpc.h">
</File>
<File
RelativePath=".\net\pickuppool.cpp">
</File>
<File
RelativePath=".\net\pickuppool.h">
</File>
<File
RelativePath=".\net\playerpool.cpp">
</File>