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