From 899b8fa25af82041038542c716429a7048648b37 Mon Sep 17 00:00:00 2001 From: powerof3 <32599957+powerof3@users.noreply.github.com> Date: Sun, 17 Sep 2023 09:15:21 +0530 Subject: [PATCH] fix: `TESForm` inheritance (#62) --- CommonLibSF/include/RE/B/BaseFormComponent.h | 2 -- CommonLibSF/include/RE/T/TESForm.h | 5 ++--- CommonLibSF/include/RE/T/TESFormRefCount.h | 8 +++++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CommonLibSF/include/RE/B/BaseFormComponent.h b/CommonLibSF/include/RE/B/BaseFormComponent.h index 03511c0c..a059efa2 100644 --- a/CommonLibSF/include/RE/B/BaseFormComponent.h +++ b/CommonLibSF/include/RE/B/BaseFormComponent.h @@ -1,7 +1,5 @@ #pragma once -#include "RE/T/TESFormRefCount.h" - namespace RE { class BaseFormComponent diff --git a/CommonLibSF/include/RE/T/TESForm.h b/CommonLibSF/include/RE/T/TESForm.h index c99505f0..1bee9a4a 100644 --- a/CommonLibSF/include/RE/T/TESForm.h +++ b/CommonLibSF/include/RE/T/TESForm.h @@ -1,16 +1,15 @@ #pragma once #include "RE/B/BSReflection.h" -#include "RE/B/BaseFormComponent.h" #include "RE/T/TESFile.h" +#include "RE/T/TESFormRefCount.h" namespace RE { class TESObjectREFR; class TESForm : - public BaseFormComponent, // 00 - public TESFormRefCount, // 08 + public TESFormRefCount, // 00 public BSReflection::IObject // 10 { public: diff --git a/CommonLibSF/include/RE/T/TESFormRefCount.h b/CommonLibSF/include/RE/T/TESFormRefCount.h index 2d57faf2..f727fe51 100644 --- a/CommonLibSF/include/RE/T/TESFormRefCount.h +++ b/CommonLibSF/include/RE/T/TESFormRefCount.h @@ -1,14 +1,16 @@ #pragma once +#include "RE/B/BaseFormComponent.h" + namespace RE { - struct TESFormRefCount + struct TESFormRefCount : public BaseFormComponent { public: SF_RTTI(TESFormRefCount); // members - volatile mutable std::uint64_t refCount; // 0x0 + volatile mutable std::uint64_t refCount; // 08 }; - static_assert(sizeof(TESFormRefCount) == 0x08); + static_assert(sizeof(TESFormRefCount) == 0x10); }