1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 16:20:01 +00:00

Merge pull request #769 from Sergeanur/VC/Pickups

Partial Pickups
This commit is contained in:
erorcun 2020-10-18 20:01:32 +03:00 committed by GitHub
commit 1858904ce0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 419 additions and 441 deletions

File diff suppressed because it is too large Load diff

View file

@ -34,21 +34,23 @@ class CPickup
{ {
public: public:
CVector m_vecPos; CVector m_vecPos;
uint32 m_nRevenue; float m_fRevenue;
CObject *m_pObject; CObject *m_pObject;
CObject *m_pExtraObject; CObject *m_pExtraObject;
uint16 m_nQuantity; uint32 m_nQuantity;
uint32 m_nTimer; uint32 m_nTimer;
int16 m_nMoneySpeed; uint16 m_nMoneySpeed;
int16 m_eModelIndex; int16 m_eModelIndex;
uint16 m_nIndex; uint16 m_nIndex;
char m_sTextKey[8]; char m_sTextKey[8];
ePickupType m_eType; ePickupType m_eType;
bool m_bRemoved; 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); bool Update(CPlayerPed *player, CVehicle *vehicle, int playerId);
void GetRidOfObjects();
private: private:
bool IsMine() { return m_eType >= PICKUP_MINE_INACTIVE && m_eType <= PICKUP_FLOATINGPACKAGE_FLOATING; } bool IsMine() { return m_eType >= PICKUP_MINE_INACTIVE && m_eType <= PICKUP_FLOATINGPACKAGE_FLOATING; }
inline bool CanBePickedUp(CPlayerPed *player, int playerId); inline bool CanBePickedUp(CPlayerPed *player, int playerId);
@ -64,8 +66,9 @@ struct tPickupMessage
eWeaponType m_weaponType; eWeaponType m_weaponType;
CVector2D m_dist; CVector2D m_dist;
CRGBA m_color; CRGBA m_color;
uint8 m_bOutOfStock : 1; uint8 m_bOutOfStock;
uint8 m_quantity; uint8 m_quantity;
uint16 money;
}; };
class CPickups class CPickups
@ -111,13 +114,13 @@ public:
static CVector StaticCamCoors; static CVector StaticCamCoors;
static uint32 StaticCamStartTime; static uint32 StaticCamStartTime;
//TODO(MIAMI) static void RemoveAllPickupsOfACertainWeaponGroupWithNoAmmo(eWeaponType);
static void RemoveAllPickupsOfACertainWeaponGroupWithNoAmmo(eWeaponType) {} static CPickup *FindPickUpForThisObject(CEntity*);
}; };
extern uint16 AmmoForWeapon[20]; extern uint16 AmmoForWeapon[WEAPONTYPE_TOTALWEAPONS + 1];
extern uint16 AmmoForWeapon_OnStreet[WEAPONTYPE_TOTALWEAPONS]; extern uint16 AmmoForWeapon_OnStreet[WEAPONTYPE_TOTALWEAPONS + 1];
extern uint16 CostOfWeapon[20]; extern uint16 CostOfWeapon[WEAPONTYPE_TOTALWEAPONS + 3];
enum ePacmanPickupType enum ePacmanPickupType
{ {

View file

@ -40,10 +40,10 @@ CWeaponModelInfo::SetWeaponInfo(int32 weaponId)
m_atomics[2] = (RpAtomic*)weaponId; m_atomics[2] = (RpAtomic*)weaponId;
} }
int32 eWeaponType
CWeaponModelInfo::GetWeaponInfo(void) CWeaponModelInfo::GetWeaponInfo(void)
{ {
return (int32)(uintptr)m_atomics[2]; return (eWeaponType)(uintptr)m_atomics[2];
} }
void void

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "SimpleModelInfo.h" #include "SimpleModelInfo.h"
#include "WeaponType.h"
class CWeaponModelInfo : public CSimpleModelInfo class CWeaponModelInfo : public CSimpleModelInfo
{ {
@ -18,5 +19,5 @@ public:
void Init(void); void Init(void);
void SetWeaponInfo(int32 weaponId); void SetWeaponInfo(int32 weaponId);
int32 GetWeaponInfo(void); eWeaponType GetWeaponInfo(void);
}; };