From c8ee3082ae30f62fc2a22a4b682deceda4ad0775 Mon Sep 17 00:00:00 2001 From: maybegreat48 <96936658+maybegreat48@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:01:39 +0000 Subject: [PATCH] Add CPlayerCameraDataNode and updated globals (#104) --- datanodes/player/CPlayerCameraDataNode.hpp | 27 ++++++++++++++++++++++ script/globals/GlobalPlayerBD.hpp | 6 ++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 datanodes/player/CPlayerCameraDataNode.hpp diff --git a/datanodes/player/CPlayerCameraDataNode.hpp b/datanodes/player/CPlayerCameraDataNode.hpp new file mode 100644 index 0000000..bdb7dc2 --- /dev/null +++ b/datanodes/player/CPlayerCameraDataNode.hpp @@ -0,0 +1,27 @@ +#pragma once +#include + +#pragma pack(push, 4) +class CPlayerCameraDataNode +{ +public: + char pad_0000[192]; //0x0000 + float m_free_cam_pos_x; //0x00C0 + float m_free_cam_pos_y; //0x00C4 + float m_free_cam_pos_z; //0x00C8 + char pad_00CC[4]; //0x00CC + float m_lock_on_target_offset_x; //0x00D0 + float m_lock_on_target_offset_y; //0x00D4 + char pad_00D8[40]; //0x00D8 + float m_camera_x; //0x0100 + float m_camera_z; //0x0104 + int16_t m_free_aim_locked_on_target; //0x0108 + bool m_free_cam; //0x010A + char pad_010B[2]; //0x010B + bool m_has_position_offset; //0x010D + char pad_010E[1]; //0x010E + bool m_is_long_range_target; //0x010F + char pad_0110[48]; //0x0110 +}; //Size: 0x0140 +static_assert(sizeof(CPlayerCameraDataNode) == 0x140); +#pragma pack(pop) \ No newline at end of file diff --git a/script/globals/GlobalPlayerBD.hpp b/script/globals/GlobalPlayerBD.hpp index 811de58..93764af 100644 --- a/script/globals/GlobalPlayerBD.hpp +++ b/script/globals/GlobalPlayerBD.hpp @@ -484,7 +484,7 @@ struct GlobalPlayerBDEntry SCR_BOOL GamerTagShowArrow; SCR_BOOL CarWashInProgress; INTERIOR_INDEX CurrentInteriorIndex; - SCR_INT PAD_0246; // TODO + SCR_INT CurrentShopIndex; // things like clothing and tattoo stores SCR_INT CurrentStoreIndex; // the stores in the map which can be held up SCR_BOOL ShopActive; // any shop SCR_BOOL InTaxi; @@ -492,7 +492,7 @@ struct GlobalPlayerBDEntry SCR_INT PrimaryHairColor; SCR_INT SecondaryHairColor; SCR_INT FriendlyPlayers; // bitset of player team relgroups that obtain a Respect relationship with player - SCR_BOOL KilledByPlayer; // verify + SCR_BOOL IsInvisible; SCR_BOOL InImpromptuDeathmatch; SCR_VEC3 ImpromptuDeatmatchStartPosition; SCR_INT PAD_0569; // not read by scripts, impromptu DM related @@ -544,7 +544,7 @@ struct GlobalPlayerBDEntry SCR_INT CurrentlyUsingArenaTrapActivatedTime; ARCADE_GAME ArcadeGame; SCR_INT DancePartner; - SCR_INT PAD_0445; + SCR_INT CayoPericoFlags; SCR_INT BeachPartyFlags; uint64_t PAD_0477[10]; // I don't think we'll ever be able to figure out what this does SCR_INT ThreeCardPokerStyle;