mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47: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++)
|
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
|
#ifndef SAMPSRV_GANGZONEPOOL_H
|
||||||
#define SAMPSRV_GANGZONEPOOL_H
|
#define SAMPSRV_GANGZONEPOOL_H
|
||||||
|
|
||||||
class CGangZonePool // size: WL 20480
|
//----------------------------------------------------
|
||||||
|
|
||||||
|
class CGangZonePool
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
char gap0[16384];
|
float m_fGangZone[MAX_GANG_ZONES][4];
|
||||||
int field_4000[1024];
|
BOOL m_bSlotState[MAX_GANG_ZONES];
|
||||||
public:
|
public:
|
||||||
CGangZonePool();
|
CGangZonePool();
|
||||||
~CGangZonePool() {};
|
~CGangZonePool() {};
|
||||||
|
WORD New(float fMinX, float fMinY, float fMaxX, float fMaxY);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user