mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37: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_1F40[ActorID] = 0;
|
||||
}
|
||||
field_2EE0 = 0;
|
||||
m_iPoolSize = 0;
|
||||
}
|
||||
|
||||
CActorPool::~CActorPool()
|
||||
|
@ -8,12 +8,14 @@ private:
|
||||
int field_0[1000];
|
||||
int field_FA0[1000];
|
||||
int field_1F40[1000];
|
||||
int field_2EE0;
|
||||
int m_iPoolSize;
|
||||
public:
|
||||
CActorPool();
|
||||
~CActorPool();
|
||||
|
||||
BOOL Delete(ACTORID ActorID);
|
||||
|
||||
int GetPoolSize() { return m_iPoolSize; };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
RakServerInterface * GetRakServer() { return m_pRak; };
|
||||
CGameMode * GetGameMode() { return m_pGameMode; };
|
||||
CFilterScripts * GetFilterScripts() { return m_pFilterScripts; };
|
||||
CActorPool * GetActorPool() { return m_pActorPool; };
|
||||
|
||||
char *GetNextScriptFile();
|
||||
void LoadAllFilterscripts();
|
||||
|
@ -33,11 +33,19 @@ static cell AMX_NATIVE_CALL n_GetVehiclePoolSize(AMX *amx, cell *params)
|
||||
return -1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// native GetActorPoolSize()
|
||||
static cell AMX_NATIVE_CALL n_GetActorPoolSize(AMX *amx, cell *params)
|
||||
{
|
||||
// TODO: GetActorPoolSize
|
||||
return 0;
|
||||
if(!pNetGame) return -1;
|
||||
CActorPool *pActorPool = pNetGame->GetActorPool();
|
||||
if(pActorPool) {
|
||||
return pActorPool->GetPoolSize();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
static cell AMX_NATIVE_CALL n_print(AMX *amx, cell *params)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user