Added code for the Allow All Vehicle Weapons refactor. (#156)

* Added more classes for drive-by weapons.

* Added CGetPedSeatReturnClass.

* Fixed atArray contains method throwing compile time exceptions.
This commit is contained in:
gir489 2023-12-19 02:43:45 -05:00 committed by GitHub
parent f33d9d2b18
commit 5881f50a80
8 changed files with 38 additions and 3 deletions

View File

@ -205,6 +205,7 @@
#include "vehicle/CVehicleDriveByMetadataMgr.hpp"
#include "vehicle/CVehicleSeatMetadataMgr.hpp"
#include "vehicle/CTrainConfig.hpp"
#include "vehicle/CGetPedSeatReturnClass.hpp"
#include "weapon/CAmmoInfo.hpp"
#include "weapon/CAmmoProjectileInfo.hpp"
#include "weapon/CAmmoRocketInfo.hpp"

Binary file not shown.

View File

@ -44,7 +44,9 @@ public:
float m_injured_health_threshold; //0x1518
float m_dying_health_threshold; //0x151C
float m_hurt_health_threshold; //0x1520
char pad_1524[240]; //0x1524
char pad_1524[12]; //0x1524
void* m_seat_info; //0x1530
char pad_1538[220]; //0x1538
uint16_t m_cash; //0x1614
char pad_1616[842]; //0x1616
uint8_t fired_sticky_bombs; //0x1960 reverse from 1.66 2824 function E8 ? ? ? 48 8B F8 EB 5F add(1).rip(), function string: WM_MAX_STICKY

View File

@ -198,7 +198,7 @@ namespace rage
bool contains(T comparator)
{
for (auto iter_value : this)
for (auto iter_value : *this)
{
if (iter_value == comparator)
{

View File

@ -0,0 +1,9 @@
#include "CWeaponGroupNames.hpp"
class CDriveByAnimInfo
{
public:
char pad_0000[48]; //0x0000
class CWeaponGroupNames* m_weapon_groups; //0x0030
}; //Size: 0x0088
static_assert(sizeof(CDriveByAnimInfo) == 0x38);

View File

@ -0,0 +1,9 @@
#pragma pack(push, 1)
class CGetPedSeatReturnClass
{
public:
char padding[8];
CVehicleDriveByAnimInfo* anim_info;
};
#pragma pack(pop)

View File

@ -1,4 +1,5 @@
#include "../rage/atArray.hpp"
#include "CDriveByAnimInfo.hpp"
#pragma once
@ -31,6 +32,6 @@ public:
float m_spine_additive_blend_out_duration; //0x005C
float m_min_unarmed_driveby_yaw_if_window_rolled_up; //0x0060
float m_max_unarmed_driveby_yaw_if_window_rolled_up; //0x0064
rage::atArray<const Hash*> m_drive_by_anim_infos; //0x0068
rage::atArray<CDriveByAnimInfo*> m_drive_by_anim_infos; //0x0068
}; //Size: 0x0078
#pragma pack(pop)

View File

@ -0,0 +1,13 @@
#include "../rage/atArray.hpp"
#pragma pack(push, 1)
class CWeaponGroupNames
{
public:
char pad_0000[8]; //0x0000
rage::atArray<Hash> m_groups; //0x0008
char pad_0018[4]; //0x0018
rage::atArray<Hash> m_weapons; //0x001C
}; //Size: 0x002C
#pragma pack(pop)
static_assert(sizeof(CWeaponGroupNames) == 0x2C);