From ef47dad566db734b1efda862c414cf89af53d07e Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 17 Oct 2020 08:23:01 +0300 Subject: Partial Pickups --- src/control/Pickups.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/control/Pickups.h') diff --git a/src/control/Pickups.h b/src/control/Pickups.h index d7d22174..dd5e60c6 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -34,21 +34,23 @@ class CPickup { public: CVector m_vecPos; - uint32 m_nRevenue; + float m_fRevenue; CObject *m_pObject; CObject *m_pExtraObject; - uint16 m_nQuantity; + uint32 m_nQuantity; uint32 m_nTimer; - int16 m_nMoneySpeed; + uint16 m_nMoneySpeed; int16 m_eModelIndex; uint16 m_nIndex; char m_sTextKey[8]; ePickupType m_eType; bool m_bRemoved; - uint8 m_effects; + uint8 m_effects:1; + uint8 m_effects2:1; - CObject *GiveUsAPickUpObject(int32 handle); + CObject *GiveUsAPickUpObject(CObject **object, CObject **extraObject, int32 handle, int32 extraHandle); bool Update(CPlayerPed *player, CVehicle *vehicle, int playerId); + void GetRidOfObjects(); private: bool IsMine() { return m_eType >= PICKUP_MINE_INACTIVE && m_eType <= PICKUP_FLOATINGPACKAGE_FLOATING; } inline bool CanBePickedUp(CPlayerPed *player, int playerId); @@ -111,8 +113,7 @@ public: static CVector StaticCamCoors; static uint32 StaticCamStartTime; -//TODO(MIAMI) - static void RemoveAllPickupsOfACertainWeaponGroupWithNoAmmo(eWeaponType) {} + static void RemoveAllPickupsOfACertainWeaponGroupWithNoAmmo(eWeaponType); }; extern uint16 AmmoForWeapon[20]; -- cgit v1.2.3 From 63666391d4f63570fe354e695bc32d22d9418ef9 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 17 Oct 2020 15:57:12 +0300 Subject: More Pickup stuff --- src/control/Pickups.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/control/Pickups.h') diff --git a/src/control/Pickups.h b/src/control/Pickups.h index dd5e60c6..9fa90549 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -66,8 +66,9 @@ struct tPickupMessage eWeaponType m_weaponType; CVector2D m_dist; CRGBA m_color; - uint8 m_bOutOfStock : 1; + uint8 m_bOutOfStock; uint8 m_quantity; + uint16 money; }; class CPickups @@ -114,6 +115,7 @@ public: static uint32 StaticCamStartTime; static void RemoveAllPickupsOfACertainWeaponGroupWithNoAmmo(eWeaponType); + static CPickup *FindPickUpForThisObject(CEntity*); }; extern uint16 AmmoForWeapon[20]; -- cgit v1.2.3 From e465cea07b791cf5fa76d5416cfd33dabaf3702f Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 17 Oct 2020 17:53:27 +0300 Subject: Pickup arrays done --- src/control/Pickups.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/control/Pickups.h') diff --git a/src/control/Pickups.h b/src/control/Pickups.h index 9fa90549..6c3045f7 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -118,9 +118,9 @@ public: static CPickup *FindPickUpForThisObject(CEntity*); }; -extern uint16 AmmoForWeapon[20]; -extern uint16 AmmoForWeapon_OnStreet[WEAPONTYPE_TOTALWEAPONS]; -extern uint16 CostOfWeapon[20]; +extern uint16 AmmoForWeapon[WEAPONTYPE_TOTALWEAPONS + 1]; +extern uint16 AmmoForWeapon_OnStreet[WEAPONTYPE_TOTALWEAPONS + 1]; +extern uint16 CostOfWeapon[WEAPONTYPE_TOTALWEAPONS + 3]; enum ePacmanPickupType { -- cgit v1.2.3