mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[server] Implement and match n_GetActorPoolSize(...)
This commit is contained in:
parent
026d199e61
commit
7f97bd273f
@ -9,7 +9,7 @@ CActorPool::CActorPool()
|
|||||||
field_FA0[ActorID] = 0;
|
field_FA0[ActorID] = 0;
|
||||||
field_1F40[ActorID] = 0;
|
field_1F40[ActorID] = 0;
|
||||||
}
|
}
|
||||||
field_2EE0 = 0;
|
m_iPoolSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CActorPool::~CActorPool()
|
CActorPool::~CActorPool()
|
||||||
|
@ -8,12 +8,14 @@ private:
|
|||||||
int field_0[1000];
|
int field_0[1000];
|
||||||
int field_FA0[1000];
|
int field_FA0[1000];
|
||||||
int field_1F40[1000];
|
int field_1F40[1000];
|
||||||
int field_2EE0;
|
int m_iPoolSize;
|
||||||
public:
|
public:
|
||||||
CActorPool();
|
CActorPool();
|
||||||
~CActorPool();
|
~CActorPool();
|
||||||
|
|
||||||
BOOL Delete(ACTORID ActorID);
|
BOOL Delete(ACTORID ActorID);
|
||||||
|
|
||||||
|
int GetPoolSize() { return m_iPoolSize; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,6 +82,7 @@ public:
|
|||||||
RakServerInterface * GetRakServer() { return m_pRak; };
|
RakServerInterface * GetRakServer() { return m_pRak; };
|
||||||
CGameMode * GetGameMode() { return m_pGameMode; };
|
CGameMode * GetGameMode() { return m_pGameMode; };
|
||||||
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
||||||
|
CActorPool * GetActorPool() { return m_pActorPool; };
|
||||||
|
|
||||||
char *GetNextScriptFile();
|
char *GetNextScriptFile();
|
||||||
void LoadAllFilterscripts();
|
void LoadAllFilterscripts();
|
||||||
|
@ -33,12 +33,20 @@ static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// native GetActorPoolSize()
|
||||||
static cell AMX_NATIVE_CALL n_GetActorPoolSize(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_GetActorPoolSize(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: GetActorPoolSize
|
if(!pNetGame) return -1;
|
||||||
return 0;
|
CActorPool *pActorPool = pNetGame->GetActorPool();
|
||||||
|
if(pActorPool) {
|
||||||
|
return pActorPool->GetPoolSize();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL n_print(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL n_print(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
// TODO: print
|
// TODO: print
|
||||||
|
Loading…
Reference in New Issue
Block a user