mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CPickupPool destructor
* Update CPickupPool constructor
This commit is contained in:
parent
74eded7b21
commit
8154fb5da2
@ -90,6 +90,8 @@ const SCRIPT_COMMAND text_clear_all = { 0x00be, "" };
|
||||
|
||||
const SCRIPT_COMMAND create_pickup_with_ammo = { 0x032b, "iiifffv" };
|
||||
|
||||
const SCRIPT_COMMAND destroy_pickup = { 0x0215, "i" };
|
||||
|
||||
const SCRIPT_COMMAND link_vehicle_to_interior = { 0x0840, "ii" };
|
||||
const SCRIPT_COMMAND create_radar_marker_icon = { 0x0570, "fffiv" };
|
||||
|
||||
|
@ -9,10 +9,24 @@ CPickupPool::CPickupPool()
|
||||
field_0 = 0;
|
||||
for (int i = 0; i < MAX_PICKUPS; i++)
|
||||
{
|
||||
field_4[i] = 0;
|
||||
m_dwHnd[i] = NULL;
|
||||
field_8004[i] = 0;
|
||||
field_4004[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CPickupPool::~CPickupPool()
|
||||
{
|
||||
for(int i = 0; i < MAX_PICKUPS; i++)
|
||||
{
|
||||
if (m_dwHnd[i] != NULL)
|
||||
{
|
||||
ScriptCommand(&destroy_pickup, m_dwHnd[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
|
@ -10,7 +10,7 @@ class CPickupPool
|
||||
private:
|
||||
|
||||
int field_0;
|
||||
int field_4[MAX_PICKUPS];
|
||||
DWORD m_dwHnd[MAX_PICKUPS];
|
||||
int field_4004[MAX_PICKUPS];
|
||||
int field_8004[MAX_PICKUPS];
|
||||
|
||||
@ -21,6 +21,7 @@ private:
|
||||
public:
|
||||
|
||||
CPickupPool();
|
||||
~CPickupPool();
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user