CommonLibSSE (powerof3)
BGSProjectile.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BGSPreloadable.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/S/SoundLevels.h"
7 #include "RE/T/TESBoundObject.h"
8 #include "RE/T/TESFullName.h"
9 #include "RE/T/TESModel.h"
10 
11 namespace RE
12 {
13  struct BGSProjectileData // DATA
14  {
15  public:
16  enum class BGSProjectileFlags
17  {
18  kNone = 0,
19  kHitScan = 1 << 0,
20  kExplosion = 1 << 1,
21  kExplosionAltTrigger = 1 << 2,
22  kMuzzleFlash = 1 << 3,
23  kCanTurnOff = 1 << 5,
24  kCanPickUp = 1 << 6,
25  kSupersonic = 1 << 7,
26  kPinsLimbs = 1 << 8,
27  kPassSMTransparent = 1 << 9,
29  kContinuousUpdate = 1 << 11
30  };
31 
32  enum class Type
33  {
34  kMissile = 1 << 0,
35  kGrenade = 1 << 1,
36  kBeam = 1 << 2,
37  kFlamethrower = 1 << 3,
38  kCone = 1 << 4,
39  kBarrier = 1 << 5,
40  kArrow = 1 << 6
41  };
42 
43  // members
46  float gravity; // 04
47  float speed; // 08
48  float range; // 0C
51  float tracerChance; // 20
52  float explosionProximity; // 24
53  float explosionTimer; // 28
54  std::uint32_t pad2C; // 2C
57  float muzzleFlashDuration; // 40
58  float fadeOutTime; // 44
59  float force; // 48
60  std::uint32_t pad4C; // 4C
64  float coneSpread; // 68
65  float collisionRadius; // 6C
66  float lifetime; // 70
67  float relaunchInterval; // 74
70  };
71  static_assert(sizeof(BGSProjectileData) == 0x88);
72 
73  class BGSProjectile :
74  public TESBoundObject, // 000
75  public TESFullName, // 030
76  public TESModel, // 040
77  public BGSPreloadable, // 068
78  public BGSDestructibleObjectForm // 070
79  {
80  public:
81  inline static constexpr auto RTTI = RTTI_BGSProjectile;
82  inline static constexpr auto FORMTYPE = FormType::Projectile;
83 
84  struct RecordFlags
85  {
86  enum RecordFlag : std::uint32_t
87  {
88  kDeleted = 1 << 5,
89  kIgnored = 1 << 12
90  };
91  };
92 
93  ~BGSProjectile() override; // 00
94 
95  // override (TESBoundObject)
96  void InitializeData() override; // 04
97  void ClearData() override; // 05
98  bool Load(TESFile* a_mod) override; // 06
99  void InitItemImpl() override; // 13
100  bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37
101  NiAVObject* Clone3D(TESObjectREFR* a_ref, bool a_arg3) override; // 40
102  void UnClone3D(TESObjectREFR* a_ref) override; // 41
103  bool GetActivateText(TESObjectREFR* a_activator, BSString& a_dst) override; // 4C
104 
105  // members
106  BGSProjectileData data; // 080 - DATA
108  SOUND_LEVEL soundLevel; // 130 - VNAM
109  std::uint32_t pad134; // 134
110  };
111  static_assert(sizeof(BGSProjectile) == 0x138);
112 }
Definition: BGSCollisionLayer.h:15
Definition: BGSDestructibleObjectForm.h:61
Definition: BGSExplosion.h:53
Definition: BGSPreloadable.h:8
Definition: BGSProjectile.h:79
void UnClone3D(TESObjectREFR *a_ref) override
bool GetActivateText(TESObjectREFR *a_activator, BSString &a_dst) override
static constexpr auto FORMTYPE
Definition: BGSProjectile.h:82
bool Load(TESFile *a_mod) override
NiAVObject * Clone3D(TESObjectREFR *a_ref, bool a_arg3) override
BGSProjectileData data
Definition: BGSProjectile.h:106
static constexpr auto RTTI
Definition: BGSProjectile.h:81
~BGSProjectile() override
void ClearData() override
void InitializeData() override
TESModel muzzleFlashModel
Definition: BGSProjectile.h:107
void InitItemImpl() override
bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount) override
std::uint32_t pad134
Definition: BGSProjectile.h:109
SOUND_LEVEL soundLevel
Definition: BGSProjectile.h:108
Definition: BGSSoundDescriptorForm.h:14
Definition: BGSTextureSet.h:16
Definition: NiAVObject.h:45
Definition: TESBoundObject.h:24
Definition: TESFile.h:14
Definition: TESFullName.h:9
Definition: TESModel.h:16
Definition: TESObjectLIGH.h:64
Definition: TESObjectREFR.h:103
Definition: TESObjectWEAP.h:73
Definition: AbsorbEffect.h:6
SOUND_LEVEL
Definition: SoundLevels.h:6
constexpr REL::ID RTTI_BGSProjectile
Definition: Offsets_RTTI.h:1510
Definition: BGSProjectile.h:14
Type
Definition: BGSProjectile.h:33
BGSCollisionLayer * collisionLayer
Definition: BGSProjectile.h:69
BGSSoundDescriptorForm * deactivateSound
Definition: BGSProjectile.h:62
float explosionProximity
Definition: BGSProjectile.h:52
float relaunchInterval
Definition: BGSProjectile.h:67
std::uint32_t pad4C
Definition: BGSProjectile.h:60
BGSProjectileFlags
Definition: BGSProjectile.h:17
float tracerChance
Definition: BGSProjectile.h:51
BGSSoundDescriptorForm * countdownSound
Definition: BGSProjectile.h:61
float collisionRadius
Definition: BGSProjectile.h:65
std::uint32_t pad2C
Definition: BGSProjectile.h:54
float force
Definition: BGSProjectile.h:59
BGSTextureSet * decalData
Definition: BGSProjectile.h:68
float muzzleFlashDuration
Definition: BGSProjectile.h:57
float gravity
Definition: BGSProjectile.h:46
TESObjectLIGH * light
Definition: BGSProjectile.h:49
stl::enumeration< BGSProjectileFlags, std::uint16_t > flags
Definition: BGSProjectile.h:44
BGSExplosion * explosionType
Definition: BGSProjectile.h:55
stl::enumeration< Type, std::uint16_t > types
Definition: BGSProjectile.h:45
float fadeOutTime
Definition: BGSProjectile.h:58
float lifetime
Definition: BGSProjectile.h:66
TESObjectLIGH * muzzleFlashLight
Definition: BGSProjectile.h:50
float speed
Definition: BGSProjectile.h:47
TESObjectWEAP * defaultWeaponSource
Definition: BGSProjectile.h:63
float range
Definition: BGSProjectile.h:48
float coneSpread
Definition: BGSProjectile.h:64
float explosionTimer
Definition: BGSProjectile.h:53
BGSSoundDescriptorForm * activeSoundLoop
Definition: BGSProjectile.h:56
Definition: BGSProjectile.h:85
RecordFlag
Definition: BGSProjectile.h:87
@ kIgnored
Definition: BGSProjectile.h:89
@ kDeleted
Definition: BGSProjectile.h:88