mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[server] Implement/match CGangZonePool::New(...)
* Update CGangZonePool constructor
This commit is contained in:
parent
5c6af25c40
commit
4c09be8e80
@ -5,9 +5,23 @@ CGangZonePool::CGangZonePool()
|
||||
{
|
||||
for (WORD wZone = 0; wZone < MAX_GANG_ZONES; wZone++)
|
||||
{
|
||||
field_4000[wZone] = 0;
|
||||
m_bSlotState[wZone] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
WORD CGangZonePool::New(float fMinX, float fMinY, float fMaxX, float fMaxY)
|
||||
{
|
||||
WORD wZone = 0;
|
||||
while (wZone < MAX_GANG_ZONES)
|
||||
{
|
||||
if (!m_bSlotState[wZone]) break;
|
||||
wZone++;
|
||||
}
|
||||
if (wZone == MAX_GANG_ZONES) return 0xFFFF;
|
||||
m_fGangZone[wZone][0] = fMinX;
|
||||
m_fGangZone[wZone][1] = fMinY;
|
||||
m_fGangZone[wZone][2] = fMaxX;
|
||||
m_fGangZone[wZone][3] = fMaxY;
|
||||
m_bSlotState[wZone] = TRUE;
|
||||
return wZone;
|
||||
}
|
||||
|
@ -2,14 +2,19 @@
|
||||
#ifndef SAMPSRV_GANGZONEPOOL_H
|
||||
#define SAMPSRV_GANGZONEPOOL_H
|
||||
|
||||
class CGangZonePool // size: WL 20480
|
||||
//----------------------------------------------------
|
||||
|
||||
class CGangZonePool
|
||||
{
|
||||
private:
|
||||
char gap0[16384];
|
||||
int field_4000[1024];
|
||||
float m_fGangZone[MAX_GANG_ZONES][4];
|
||||
BOOL m_bSlotState[MAX_GANG_ZONES];
|
||||
public:
|
||||
CGangZonePool();
|
||||
~CGangZonePool() {};
|
||||
WORD New(float fMinX, float fMinY, float fMaxX, float fMaxY);
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user