From 9d56713703f352f7da9bea47bc8c083a4ca2beb6 Mon Sep 17 00:00:00 2001 From: Louis Poirier Date: Wed, 24 Jul 2024 21:50:14 +0200 Subject: [PATCH] feat: add vehicleBaseObject::isOnGround and generate stub. Property offset at 0x25C, useful for readonly usage. --- .../Natives/Generated/vehicle/BaseObject.hpp | 11 ++++++ .../Scripting/Natives/vehicleBaseObject.hpp | 37 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 include/RED4ext/Scripting/Natives/vehicleBaseObject.hpp diff --git a/include/RED4ext/Scripting/Natives/Generated/vehicle/BaseObject.hpp b/include/RED4ext/Scripting/Natives/Generated/vehicle/BaseObject.hpp index 05d0287de..90de58b58 100644 --- a/include/RED4ext/Scripting/Natives/Generated/vehicle/BaseObject.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/vehicle/BaseObject.hpp @@ -4,6 +4,16 @@ // This file is generated from the Game's Reflection data +#include + +namespace RED4ext +{ +RED4EXT_ASSERT_SIZE(vehicle::BaseObject, 0xB90); +using vehicleBaseObject = vehicle::BaseObject; +using VehicleObject = vehicle::BaseObject; +} // namespace RED4ext + +/* #include #include #include @@ -31,5 +41,6 @@ RED4EXT_ASSERT_SIZE(BaseObject, 0xB90); using vehicleBaseObject = vehicle::BaseObject; using VehicleObject = vehicle::BaseObject; } // namespace RED4ext +*/ // clang-format on diff --git a/include/RED4ext/Scripting/Natives/vehicleBaseObject.hpp b/include/RED4ext/Scripting/Natives/vehicleBaseObject.hpp new file mode 100644 index 000000000..ba4147ebe --- /dev/null +++ b/include/RED4ext/Scripting/Natives/vehicleBaseObject.hpp @@ -0,0 +1,37 @@ +#pragma once + +#include +#include +#include +#include + +namespace RED4ext +{ +namespace AI +{ +struct Archetype; +} + +namespace vehicle +{ +struct BaseObject : game::Object +{ + static constexpr const char* NAME = "vehicleBaseObject"; + static constexpr const char* ALIAS = "VehicleObject"; + + uint8_t unk240[0x25C - 0x240]; // 240 + bool isOnGround; // 25C + uint8_t unk25D[0x3A0 - 0x25D]; // 25D + Ref archetype; // 3A0 + uint8_t unk3B8[0x6D2 - 0x3B8]; // 3B8 + bool isVehicleOnStateLocked; // 6D2 + uint8_t unk6D3[0xB90 - 0x6D3]; // 6D3 +}; +RED4EXT_ASSERT_SIZE(BaseObject, 0xB90); +RED4EXT_ASSERT_OFFSET(BaseObject, isOnGround, 0x25C); +RED4EXT_ASSERT_OFFSET(BaseObject, archetype, 0x3A0); +RED4EXT_ASSERT_OFFSET(BaseObject, isVehicleOnStateLocked, 0x6D2); +} // namespace vehicle +using vehicleBaseObject = vehicle::BaseObject; +using VehicleObject = vehicle::BaseObject; +} // namespace RED4ext