From 98c2c1959e2ba129ccb6268f24f89b49596bbd2b Mon Sep 17 00:00:00 2001 From: Mr-X-GTA <110748953+Mr-X-GTA@users.noreply.github.com> Date: Wed, 25 Sep 2024 02:01:39 +0200 Subject: [PATCH] Add cleaned files --- .../CDynamicEntityGameStateDataNode.hpp | 26 +++++++++++++++++++ netsync/nodes/heli/CHeliHealthDataNode.hpp | 25 ++++++++++++++++++ netsync/nodes/ped/CPedInventoryDataNode.hpp | 22 ++++++++++++++++ .../physical/CPhysicalGameStateDataNode.hpp | 19 ++++++++++++++ .../physical/CPhysicalHealthDataNode.hpp | 17 ++++++++++++ .../player/CPlayerExtendedGameStateNode.hpp | 19 ++++++++++++++ 6 files changed, 128 insertions(+) create mode 100644 netsync/nodes/dynamic_entity/CDynamicEntityGameStateDataNode.hpp create mode 100644 netsync/nodes/heli/CHeliHealthDataNode.hpp create mode 100644 netsync/nodes/ped/CPedInventoryDataNode.hpp create mode 100644 netsync/nodes/physical/CPhysicalGameStateDataNode.hpp create mode 100644 netsync/nodes/physical/CPhysicalHealthDataNode.hpp create mode 100644 netsync/nodes/player/CPlayerExtendedGameStateNode.hpp diff --git a/netsync/nodes/dynamic_entity/CDynamicEntityGameStateDataNode.hpp b/netsync/nodes/dynamic_entity/CDynamicEntityGameStateDataNode.hpp new file mode 100644 index 0000000..59bcbf5 --- /dev/null +++ b/netsync/nodes/dynamic_entity/CDynamicEntityGameStateDataNode.hpp @@ -0,0 +1,26 @@ +#pragma once +#include +#include "netsync/CProjectBaseSyncDataNode.hpp" + +#pragma pack(push, 1) +struct CDecorator +{ + uint32_t m_type; + uint32_t m_name_hash; + uint32_t m_value; +}; +#pragma pack(pop) + +#pragma pack(push, 4) +class CDynamicEntityGameStateDataNode : CSyncDataNodeInfrequent +{ +public: + uint32_t m_interior_index; // 0x00C0 + bool unk_00C4; // 0x00C4 + bool unk_00C5; // 0x00C5 + uint32_t m_decor_count; // 0x00C8 + CDecorator m_decors[10]; // 0x00CC + char pad[8]; // TODO! +}; //Size: 0x15C +static_assert(sizeof(CDynamicEntityGameStateDataNode) == 0x14C); +#pragma pack(pop) \ No newline at end of file diff --git a/netsync/nodes/heli/CHeliHealthDataNode.hpp b/netsync/nodes/heli/CHeliHealthDataNode.hpp new file mode 100644 index 0000000..4369d84 --- /dev/null +++ b/netsync/nodes/heli/CHeliHealthDataNode.hpp @@ -0,0 +1,25 @@ +#pragma once +#include +#include "netsync/CProjectBaseSyncDataNode.hpp" +#include "netsync/nodes/physical/CPhysicalHealthDataNode.hpp" + +#pragma pack(push, 8) +class CHeliHealthDataNode : CPhysicalHealthDataNode // intentionally private since the physical health node fields aren't serialized +{ +public: + char m_pad[0x10]; // 0xF0 + uint32_t m_main_rotor_health; + uint32_t m_rear_rotor_health; + bool m_can_tail_boom_break_off; + bool m_is_tail_boom_broken; + bool m_unk; + bool m_disable_explode_from_body_damage; + uint32_t m_body_health; + uint32_t m_petrol_tank_health; + uint32_t m_engine_health; + float m_unk_deformation_level; + float m_unk2_deformation_level; + float m_unk3_deformation_level; +}; +static_assert(sizeof(CHeliHealthDataNode) == 0x118); +#pragma pack(pop) \ No newline at end of file diff --git a/netsync/nodes/ped/CPedInventoryDataNode.hpp b/netsync/nodes/ped/CPedInventoryDataNode.hpp new file mode 100644 index 0000000..98099fb --- /dev/null +++ b/netsync/nodes/ped/CPedInventoryDataNode.hpp @@ -0,0 +1,22 @@ +#pragma once +#include + +// todo? +#pragma pack(push, 4) +class CPedInventoryDataNode +{ +public: + char pad_0000[5232]; + uint32_t m_items[105]; + uint32_t m_num_items; + uint32_t m_ammos[65]; + uint32_t m_ammo_quantities[65]; + uint32_t m_num_ammos; + uint8_t unk_1680[105]; + uint8_t unk_16E9[105]; + char pad_1680[1260]; + bool m_infinite_ammos[65]; + bool m_ammo_all_infinite; +}; +static_assert(sizeof(CPedInventoryDataNode) == 0x1E24); +#pragma pack(pop) \ No newline at end of file diff --git a/netsync/nodes/physical/CPhysicalGameStateDataNode.hpp b/netsync/nodes/physical/CPhysicalGameStateDataNode.hpp new file mode 100644 index 0000000..c7b22c1 --- /dev/null +++ b/netsync/nodes/physical/CPhysicalGameStateDataNode.hpp @@ -0,0 +1,19 @@ +#pragma once +#include +#include "netsync/CProjectBaseSyncDataNode.hpp" + +#pragma pack(push, 4) +class CPhysicalGameStateDataNode : CSyncDataNodeInfrequent +{ +public: + bool m_is_visible; // 0xC0 + bool m_flag2; // 0xC1 + bool m_flag3; // 0xC2 + bool m_flag4; // 0xC3 + char m_pad; // 0xC4 + uint32_t m_val1; // 0xC8 + int16_t m_unk204; // 0xCC + bool m_unk5; // 0xCE +}; // 0x00CC +static_assert(sizeof(CPhysicalGameStateDataNode) == 0xD0); +#pragma pack(pop) \ No newline at end of file diff --git a/netsync/nodes/physical/CPhysicalHealthDataNode.hpp b/netsync/nodes/physical/CPhysicalHealthDataNode.hpp new file mode 100644 index 0000000..ef42245 --- /dev/null +++ b/netsync/nodes/physical/CPhysicalHealthDataNode.hpp @@ -0,0 +1,17 @@ +#pragma once +#include +#include "netsync/CProjectBaseSyncDataNode.hpp" + +#pragma pack(push, 8) +struct CPhysicalHealthDataNode : CSyncDataNodeInfrequent +{ + bool unk_00C0; //0x00C0 + bool m_has_max_health_changed; //0x00C1 + uint32_t m_max_health; //0x00C4 + uint32_t m_current_health; //0x00C8 + uint16_t m_weapon_damage_entity; //0x00CC + uint32_t m_weapon_damage_hash; //0x00D0 + uint64_t unk_00D8; //0x00D8 +}; +static_assert(sizeof(CPhysicalHealthDataNode) == 0xE0); +#pragma pack(pop) \ No newline at end of file diff --git a/netsync/nodes/player/CPlayerExtendedGameStateNode.hpp b/netsync/nodes/player/CPlayerExtendedGameStateNode.hpp new file mode 100644 index 0000000..d50420b --- /dev/null +++ b/netsync/nodes/player/CPlayerExtendedGameStateNode.hpp @@ -0,0 +1,19 @@ +#pragma once +#include +#include "netsync/CProjectBaseSyncDataNode.hpp" + +#pragma pack(push, 1) +class CPlayerExtendedGameStateNode : CSyncDataNodeInfrequent +{ +public: + float waypoint_x; //0x00C0 + float waypoint_y; //0x00C4 + bool unk1; //0x00C5 + bool unk2; //0x00C6 + bool unk3; //0x00C7 + bool unk4; //0x00C8 + bool unk5; //0x00C9 + bool has_waypoint_data; //0x00CA + bool is_waypoint_set; //0x00CB +}; +#pragma pack(pop) \ No newline at end of file