mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement CActorPool ctor
This commit is contained in:
parent
05309cad36
commit
864ab50d1e
@ -4,6 +4,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#define MAX_PLAYERS 1004
|
||||
#define MAX_ACTORS 1000
|
||||
#define MAX_VEHICLES 2000
|
||||
#define MAX_OBJECTS 1000
|
||||
#define PLAYER_PED_SLOTS 210
|
||||
@ -11,6 +12,7 @@
|
||||
//-----------------------------------------------------------
|
||||
|
||||
typedef unsigned short VEHICLEID;
|
||||
typedef unsigned short ACTORID;
|
||||
typedef unsigned short PLAYERID;
|
||||
|
||||
typedef struct _VECTOR {
|
||||
|
@ -30,6 +30,7 @@ typedef struct _GAME_SETTINGS {
|
||||
#include "../raknet/GetTime.h"
|
||||
|
||||
#include "net/netrpc.h"
|
||||
#include "net/actorpool.h"
|
||||
#include "net/vehiclepool.h"
|
||||
#include "net/pickuppool.h"
|
||||
#include "net/objectpool.h"
|
||||
|
16
saco/net/actorpool.cpp
Normal file
16
saco/net/actorpool.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CActorPool::CActorPool()
|
||||
{
|
||||
for(ACTORID ActorID = 0; ActorID < MAX_ACTORS; ActorID++) {
|
||||
field_FA4[ActorID] = 0;
|
||||
field_4[ActorID] = 0;
|
||||
field_1F44[ActorID] = 0;
|
||||
}
|
||||
field_0 = 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
21
saco/net/actorpool.h
Normal file
21
saco/net/actorpool.h
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
class CActorPool
|
||||
{
|
||||
private:
|
||||
int field_0;
|
||||
int field_4[MAX_ACTORS];
|
||||
int field_FA4[MAX_ACTORS];
|
||||
int field_1F44[MAX_ACTORS];
|
||||
|
||||
char _gap2EE4[8000];
|
||||
|
||||
public:
|
||||
|
||||
CActorPool();
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
@ -37,6 +37,7 @@ void CNetGame::InitPools()
|
||||
m_pPools->pPlayerPool = new CPlayerPool();
|
||||
m_pPools->pVehiclePool = new CVehiclePool();
|
||||
m_pPools->pPickupPool = new CPickupPool();
|
||||
m_pPools->pActorPool = new CActorPool();
|
||||
}
|
||||
|
||||
DWORD CNetGame::GetTime()
|
||||
|
@ -30,7 +30,8 @@ typedef struct _NETGAME_POOLS {
|
||||
CPlayerPool *pPlayerPool;
|
||||
CPickupPool *pPickupPool;
|
||||
CObjectPool *pObjectPool;
|
||||
char _gap0[20];
|
||||
CActorPool *pActorPool;
|
||||
char _gap0[16];
|
||||
} NETGAME_POOLS;
|
||||
|
||||
class CNetGame // size: 994
|
||||
|
@ -246,6 +246,12 @@
|
||||
<Filter
|
||||
Name="net"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\net\actorpool.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\actorpool.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\net\netgame.cpp">
|
||||
</File>
|
||||
|
Loading…
Reference in New Issue
Block a user