mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2024-12-22 14:37:31 +08:00
updated CItemInfo (#160)
This commit is contained in:
parent
057df5ceda
commit
078919f9cd
@ -8,17 +8,17 @@
|
||||
class CAmmoRocketInfo : public CAmmoProjectileInfo
|
||||
{
|
||||
public:
|
||||
float m_forward_drag_coeff; //0x0170
|
||||
float m_side_drag_coeff; //0x0174
|
||||
float m_time_before_homing; //0x0178
|
||||
float m_time_before_switch_target_min; //0x017C
|
||||
float m_time_before_switch_target_max; //0x0180
|
||||
float m_proximity_radius; //0x0184
|
||||
float m_pitch_change_rate; //0x0188
|
||||
float m_yaw_change_rate; //0x018C
|
||||
float m_roll_change_rate; //0x0190
|
||||
float m_max_roll_angle_sin; //0x0194
|
||||
float m_lifetime_player_vehicle_locked_override_mp; //0x0198
|
||||
class CHomingRocketParams m_homing_rocket_params; //0x019C
|
||||
}; // Size: 0x01BC
|
||||
static_assert(sizeof(CAmmoRocketInfo) == 0x1BC);
|
||||
float m_forward_drag_coeff; //0x0170
|
||||
float m_side_drag_coeff; //0x0174
|
||||
float m_time_before_homing; //0x0178
|
||||
float m_time_before_switch_target_min; //0x017C
|
||||
float m_time_before_switch_target_max; //0x0180
|
||||
float m_proximity_radius; //0x0184
|
||||
float m_pitch_change_rate; //0x0188
|
||||
float m_yaw_change_rate; //0x018C
|
||||
float m_roll_change_rate; //0x0190
|
||||
float m_max_roll_angle_sin; //0x0194
|
||||
float m_lifetime_player_vehicle_locked_override_mp; //0x0198
|
||||
class CHomingRocketParams m_homing_rocket_params; //0x019C
|
||||
}; // Size: 0x1C0
|
||||
static_assert(sizeof(CAmmoRocketInfo) == 0x1C0);
|
@ -6,8 +6,8 @@
|
||||
|
||||
class CAmmoThrownInfo : CAmmoProjectileInfo
|
||||
{
|
||||
float m_thrown_force; //0x0170
|
||||
float m_thrown_force_from_vehicle; //0x0174
|
||||
int32_t m_ammo_max_mp_bonus; //0x0178
|
||||
}; // Size: 0x017C
|
||||
static_assert(sizeof(CAmmoThrownInfo) == 0x17C);
|
||||
float m_thrown_force; //0x0170
|
||||
float m_thrown_force_from_vehicle; //0x0174
|
||||
int32_t m_ammo_max_mp_bonus; //0x0178
|
||||
}; // Size: 0x0180
|
||||
static_assert(sizeof(CAmmoThrownInfo) == 0x180);
|
@ -2,13 +2,37 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class parStructure;
|
||||
|
||||
// https://github.com/Parik27/V.Rainbomizer/blob/0c70868626411a1d30483339003b9985b0ff1c98/lib/CItemInfo.hh
|
||||
class CItemInfo
|
||||
{
|
||||
public:
|
||||
char pad_0000[16]; //0x0000
|
||||
uint32_t m_name; //0x0010
|
||||
uint32_t m_model; //0x0014
|
||||
uint32_t m_audio; //0x0018
|
||||
uint32_t m_slot; //0x001C
|
||||
}; //Size: 0x0020
|
||||
char pad_0000[8]; //0x0000
|
||||
uint32_t m_name; //0x0010
|
||||
uint32_t m_model; //0x0014
|
||||
uint32_t m_audio; //0x0018
|
||||
uint32_t m_slot; //0x001C
|
||||
|
||||
private:
|
||||
virtual void destructor();
|
||||
virtual bool GetIsClassId(uint32_t hash);
|
||||
|
||||
// virtual uint32_t* GetClassId(); (older versions)
|
||||
virtual uint32_t* _GetClassId(uint32_t* out);
|
||||
|
||||
// Not present in older versions of GTA V
|
||||
virtual uint32_t* GetBaseClassId(uint32_t& out);
|
||||
|
||||
// as a result, these functions are shifted by 1 function in the vftable.
|
||||
virtual uint32_t GetModel();
|
||||
|
||||
virtual parStructure* parser_GetStructure();
|
||||
|
||||
public:
|
||||
uint32_t GetClassId()
|
||||
{
|
||||
return static_cast<uint32_t>(uintptr_t(_GetClassId(nullptr)));
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(CItemInfo) == 0x20);
|
||||
|
Loading…
Reference in New Issue
Block a user