From 1ef117017009d20eb548f0b98885a904cb5912f4 Mon Sep 17 00:00:00 2001 From: TommInfinite <81481291+TommInfinite@users.noreply.github.com> Date: Mon, 25 Sep 2023 22:43:00 +0300 Subject: [PATCH] feat: Add IsSpaceshipDocked and fix excessive namespace for TESWorldspace (#93) address is of 1.7.29 --- CommonLibSF/include/RE/T/TESObjectREFR.h | 1 + CommonLibSF/include/RE/T/TESWorldSpace.h | 4 ++-- CommonLibSF/src/RE/T/TESObjectREFR.cpp | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CommonLibSF/include/RE/T/TESObjectREFR.h b/CommonLibSF/include/RE/T/TESObjectREFR.h index a26e39d9..621b2dbc 100644 --- a/CommonLibSF/include/RE/T/TESObjectREFR.h +++ b/CommonLibSF/include/RE/T/TESObjectREFR.h @@ -299,6 +299,7 @@ namespace RE [[nodiscard]] bool HasKeyword(BGSKeyword* a_keyword); [[nodiscard]] bool IsCrimeToActivate(); [[nodiscard]] bool IsInSpace(bool a_arg1); + [[nodiscard]] bool IsSpaceshipDocked(); // members std::uint32_t unk80; // 80 diff --git a/CommonLibSF/include/RE/T/TESWorldSpace.h b/CommonLibSF/include/RE/T/TESWorldSpace.h index 7962bd21..25fb8df4 100644 --- a/CommonLibSF/include/RE/T/TESWorldSpace.h +++ b/CommonLibSF/include/RE/T/TESWorldSpace.h @@ -6,8 +6,8 @@ namespace RE { class TESWorldSpace : - public RE::TESForm, // 00 - public RE::TESFullName // 20 + public TESForm, // 00 + public TESFullName // 20 { public: SF_FORMTYPE(WRLD); diff --git a/CommonLibSF/src/RE/T/TESObjectREFR.cpp b/CommonLibSF/src/RE/T/TESObjectREFR.cpp index 42ee8e41..57df0fe6 100644 --- a/CommonLibSF/src/RE/T/TESObjectREFR.cpp +++ b/CommonLibSF/src/RE/T/TESObjectREFR.cpp @@ -71,4 +71,12 @@ namespace RE REL::Relocation func{ REL::Offset(0x01A0E1C8) }; return func(this, a_arg1); } + + bool TESObjectREFR::IsSpaceshipDocked() + { + using func_t = decltype(&TESObjectREFR::IsSpaceshipDocked); + REL::Relocation func{ REL::Offset(0x2B557C8) }; + return func(this); + } + }