CommonLibSSE NG
Loading...
Searching...
No Matches
Explosion.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/F/FormTypes.h"
5#include "RE/M/MagicSystem.h"
8
9namespace RE
10{
11 class BGSExplosion;
12 class BGSMaterialType;
13 class bhkCollisionObject;
14 class bhkSimpleShapePhantom;
15 class EffectSetting;
16 class MagicItem;
17 class QueuedFile;
18 class NiPointLight;
19 class NonActorMagicCaster;
20
21 class Explosion : public TESObjectREFR
22 {
23 public:
24 inline static constexpr auto RTTI = RTTI_Explosion;
25 inline static constexpr auto VTABLE = VTABLE_Explosion;
26 inline static constexpr auto FORMTYPE = FormType::Explosion;
27
28 enum class Flags
29 {
30 kNone = 0,
31 kIgnoreImageSpaceSwap = 1 << 4,
32 kInWater = 1 << 5
33 };
34
35 ~Explosion() override; // 00
36
37 // override (TESObjectREFR)
38 void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
39 void Revert(BGSLoadFormBuffer* a_buf) override; // 12
40 void SetActorCause(ActorCause* a_cause) override; // 50 - { actorCause = a_cause; }
41 ActorCause* GetActorCause() const override; // 51 - { return actorCause; }
43 void InitHavok() override; // 66
44 void Release3DRelatedData() override; // 6B
45#ifndef SKYRIM_CROSS_VR
46 // This is where in the TESObjectREFR vtable compatibility with SkyrimVR breaks.
47 [[nodiscard]] Explosion* AsExplosion() override; // 8E
48 bool OnAddCellPerformQueueReference(TESObjectCELL& a_cell) const override; // 90 - { return false; }
49#endif
50
51 // add
53 SKYRIM_REL_VR_VIRTUAL void Update(float a_delta); // A3
55
57 {
58#define EXPLOSION_RUNTIME_DATA_CONTENT \
59 std::uint64_t unk98; /* 098, 0A0 */ \
60 float startKeyTime; /* 0A0 */ \
61 float endKeyTime; /* 0A4 */ \
62 float hitKeyTime; /* 0A8 */ \
63 float radius; /* 0AC */ \
64 float imodRadius; /* 0B0 */ \
65 float unkB4; /* 0B4 */ \
66 bhkSimpleShapePhantom* unkB8; /* 0B8 */ \
67 std::uint64_t unkC0; /* 0C0 */ \
68 std::uint64_t unkC8; /* 0C8 */ \
69 BSSoundHandle sound01; /* 0D0 */ \
70 BSSoundHandle sound02; /* 0DC */ \
71 NiPointer<NiPointLight> light; /* 0E8 */ \
72 ActorHandle actorOwner; /* 0F0 */ \
73 ActorHandle unkF4; /* 0F4 */ \
74 std::uint32_t unkF8; /* 0F8 */ \
75 std::uint32_t padFC; /* 0FC */ \
76 NiPointer<ActorCause> actorCause; /* 100 */ \
77 NonActorMagicCaster* magicCaster; /* 108 */ \
78 TESObjectWEAP* weaponSource; /* 110 */ \
79 std::uint32_t unk118; /* 118 */ \
80 NiPoint3 unk11C; /* 11C */ \
81 NiPoint3 negativeVelocity; /* 128 */ \
82 float damage; /* 134 */ \
83 float unk138; /* 138 */ \
84 stl::enumeration<Flags, std::uint32_t> flags; /* 13C */
85
87 };
88
89 [[nodiscard]] inline EXPLOSION_RUNTIME_DATA& GetExplosionRuntimeData() noexcept
90 {
91 return REL::RelocateMemberIfNewer<EXPLOSION_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x98, 0xA0);
92 }
93
94 [[nodiscard]] inline const EXPLOSION_RUNTIME_DATA& GetExplosionRuntimeData() const noexcept
95 {
96 return REL::RelocateMemberIfNewer<EXPLOSION_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x98, 0xA0);
97 }
98
99 // members
100 std::uint64_t unk98; // 098
101 float startKeyTime; // 0A0
102 float endKeyTime; // 0A4
103 float hitKeyTime; // 0A8
104 float radius; // 0AC
105 float imodRadius; // 0B0
106 float unkB4; // 0B4
107 bhkSimpleShapePhantom* unkB8; // 0B8
108 std::uint64_t unkC0; // 0C0
109 std::uint64_t unkC8; // 0C8
115 std::uint32_t unkF8; // 0F8
116 std::uint32_t padFC; // 0FC
120 std::uint32_t unk118; // 118
123 float damage; // 134
124 float unk138; // 138
126 };
127#ifndef ENABLE_SKYRIM_AE
128 static_assert(sizeof(Explosion) == 0x140);
129#endif
130}
131#undef EXPLOSION_RUNTIME_DATA_CONTENT
#define EXPLOSION_RUNTIME_DATA_CONTENT
Definition Explosion.h:58
#define SKYRIM_REL_VR_VIRTUAL
Definition Relocation.h:152
Definition ActorCause.h:9
Definition BGSLoadFormBuffer.h:11
Definition Explosion.h:22
void Release3DRelatedData() override
const EXPLOSION_RUNTIME_DATA & GetExplosionRuntimeData() const noexcept
Definition Explosion.h:94
SKYRIM_REL_VR_VIRTUAL void Initialize()
static constexpr auto RTTI
Definition Explosion.h:24
NiPointer< ActorCause > actorCause
Definition Explosion.h:117
ActorCause * GetActorCause() const override
float imodRadius
Definition Explosion.h:105
void SetActorCause(ActorCause *a_cause) override
static constexpr auto FORMTYPE
Definition Explosion.h:26
TESObjectWEAP * weaponSource
Definition Explosion.h:119
std::uint32_t unk118
Definition Explosion.h:120
float startKeyTime
Definition Explosion.h:101
Flags
Definition Explosion.h:29
NiPointer< NiPointLight > light
Definition Explosion.h:112
std::uint32_t unkF8
Definition Explosion.h:115
EXPLOSION_RUNTIME_DATA & GetExplosionRuntimeData() noexcept
Definition Explosion.h:89
bhkSimpleShapePhantom * unkB8
Definition Explosion.h:107
stl::enumeration< Flags, std::uint32_t > flags
Definition Explosion.h:125
void SaveGame(BGSSaveFormBuffer *a_buf) override
BSSoundHandle sound02
Definition Explosion.h:111
float radius
Definition Explosion.h:104
std::uint32_t padFC
Definition Explosion.h:116
NiPoint3 unk11C
Definition Explosion.h:121
float hitKeyTime
Definition Explosion.h:103
float damage
Definition Explosion.h:123
ActorHandle unkF4
Definition Explosion.h:114
float endKeyTime
Definition Explosion.h:102
bool OnAddCellPerformQueueReference(TESObjectCELL &a_cell) const override
Explosion * AsExplosion() override
SKYRIM_REL_VR_VIRTUAL void Update(float a_delta)
std::uint64_t unkC8
Definition Explosion.h:109
static constexpr auto VTABLE
Definition Explosion.h:25
std::uint64_t unkC0
Definition Explosion.h:108
float unkB4
Definition Explosion.h:106
SKYRIM_REL_VR_VIRTUAL void FindTargets()
ActorHandle actorOwner
Definition Explosion.h:113
NonActorMagicCaster * magicCaster
Definition Explosion.h:118
BSSoundHandle sound01
Definition Explosion.h:110
float unk138
Definition Explosion.h:124
void Revert(BGSLoadFormBuffer *a_buf) override
std::uint64_t unk98
Definition Explosion.h:100
MagicCaster * GetMagicCaster(MagicSystem::CastingSource a_source) override
NiPoint3 negativeVelocity
Definition Explosion.h:122
~Explosion() override
void InitHavok() override
Definition MagicCaster.h:25
Definition NiPoint3.h:6
Definition NiSmartPointer.h:9
Definition NonActorMagicCaster.h:12
Definition TESObjectCELL.h:116
Definition TESObjectREFR.h:112
Definition TESObjectWEAP.h:79
Definition PCH.h:223
CastingSource
Definition MagicSystem.h:23
Definition AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 4 > VTABLE_Explosion
Definition Offsets_VTABLE.h:2779
constexpr REL::VariantID RTTI_Explosion(686635, 394482, 0x1f02ad8)
constexpr REL::Version RUNTIME_SSE_1_6_629(1, 6, 629, 0)
Definition BSSoundHandle.h:9
Definition Explosion.h:57