CommonLibSSE NG
MissileProjectile.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
4 #include "RE/I/ImpactResults.h"
5 #include "RE/P/Projectile.h"
6 
7 namespace RE
8 {
10  {
11  public:
12  inline static constexpr auto RTTI = RTTI_MissileProjectile;
13  inline static constexpr auto VTABLE = VTABLE_MissileProjectile;
14  inline static constexpr auto FORMTYPE = FormType::ProjectileMissile;
15 
16  struct RecordFlags
17  {
18  enum RecordFlag : std::uint32_t
19  {
20  };
21  };
22 
23  ~MissileProjectile() override; // 00
24 
25  // override (Projectile)
26  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
27  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
28  void InitLoadGame(BGSLoadFormBuffer* a_buf) override; // 10
29  void FinishLoadGame(BGSLoadFormBuffer* a_buf) override; // 11
30  void Revert(BGSLoadFormBuffer* a_buf) override; // 12
31 #ifndef SKYRIM_CROSS_VR
32  bool IsMissileProjectile() override; // A2 - { return 1; }
33  void Process3D() override; // A9
34  void UpdateImpl(float a_delta) override; // AB
35  bool ProcessImpacts() override; // AC
36  bool GetKillOnCollision() override; // B8 - { return unk1D8 == 1; }
37  void AddImpact(TESObjectREFR* a_ref, const NiPoint3& a_targetLoc, const NiPoint3& a_velocity, hkpCollidable* a_collidable, std::int32_t a_arg6, std::uint32_t a_arg7) override; // BD
38  void Handle3DLoaded() override; // C0
39 #endif
40 
41  // add
42  SKYRIM_REL_VR_VIRTUAL void Unk_C2(void); // C2 - { return 0; }
43  SKYRIM_REL_VR_VIRTUAL void Unk_C3(void); // C3 - { return 0; }
44 
46  {
47 #define MISSILE_RUNTIME_DATA_CONTENT \
48  ImpactResult impactResult; /* 1D8, 1E0 */ \
49  bool waitingToInitialize3D; /* 1DC */ \
50  std::uint8_t unk1DD; /* 1DD */ \
51  std::uint16_t unk1DE; /* 1DE */
52 
54  };
55 
56  [[nodiscard]] inline MISSILE_RUNTIME_DATA& GetMissileRuntimeData() noexcept
57  {
58  return REL::RelocateMemberIfNewer<MISSILE_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x1D8, 0x1E0);
59  }
60 
61  [[nodiscard]] inline const MISSILE_RUNTIME_DATA& GetMissileRuntimeData() const noexcept
62  {
63  return REL::RelocateMemberIfNewer<MISSILE_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x1D8, 0x1E0);
64  }
65 
66  // members
67 #ifndef ENABLE_SKYRIM_AE
69 #endif
70  };
71 #ifndef ENABLE_SKYRIM_AE
72  static_assert(sizeof(MissileProjectile) == 0x1E0);
73 #endif
74 }
75 #undef MISSILE_RUNTIME_DATA_CONTENT
#define SKYRIM_REL_VR_VIRTUAL
Definition: Common.h:94
#define MISSILE_RUNTIME_DATA_CONTENT
Definition: MissileProjectile.h:47
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: MissileProjectile.h:10
SKYRIM_REL_VR_VIRTUAL void Unk_C2(void)
const MISSILE_RUNTIME_DATA & GetMissileRuntimeData() const noexcept
Definition: MissileProjectile.h:61
void SaveGame(BGSSaveFormBuffer *a_buf) override
void FinishLoadGame(BGSLoadFormBuffer *a_buf) override
static constexpr auto VTABLE
Definition: MissileProjectile.h:13
void LoadGame(BGSLoadFormBuffer *a_buf) override
bool GetKillOnCollision() override
void InitLoadGame(BGSLoadFormBuffer *a_buf) override
SKYRIM_REL_VR_VIRTUAL void Unk_C3(void)
bool ProcessImpacts() override
void AddImpact(TESObjectREFR *a_ref, const NiPoint3 &a_targetLoc, const NiPoint3 &a_velocity, hkpCollidable *a_collidable, std::int32_t a_arg6, std::uint32_t a_arg7) override
static constexpr auto RTTI
Definition: MissileProjectile.h:12
void UpdateImpl(float a_delta) override
MISSILE_RUNTIME_DATA & GetMissileRuntimeData() noexcept
Definition: MissileProjectile.h:56
void Revert(BGSLoadFormBuffer *a_buf) override
static constexpr auto FORMTYPE
Definition: MissileProjectile.h:14
void Process3D() override
void Handle3DLoaded() override
bool IsMissileProjectile() override
~MissileProjectile() override
Definition: NiPoint3.h:6
Definition: Projectile.h:30
Definition: TESObjectREFR.h:113
Definition: hkpCollidable.h:13
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_MissileProjectile(687495, 395345, 0x1f1b160)
constexpr std::array< REL::VariantID, 4 > VTABLE_MissileProjectile
Definition: Offsets_VTABLE.h:2784
constexpr REL::Version RUNTIME_SSE_1_6_629(1, 6, 629, 0)
Definition: MissileProjectile.h:46
Definition: MissileProjectile.h:17
RecordFlag
Definition: MissileProjectile.h:19