CommonLibVR
VATS.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/ActorValues.h"
4 #include "RE/B/BSAtomic.h"
5 #include "RE/B/BSTArray.h"
6 #include "RE/B/BSTSingleton.h"
7 #include "RE/B/BSTSmartPointer.h"
8 #include "RE/H/HitData.h"
9 
10 namespace RE
11 {
12  class Actor;
13  class BGSCameraShot;
14  class BSLight;
15  class ExtraDataList;
16  class ImageSpaceModifierInstanceRB;
17  class TESBoundObject;
18 
20  {
21  public:
22  std::uint32_t actionPoints; // 00 - 12
23  std::uint8_t unk04; // 04
24  std::uint8_t unk05; // 05
25  std::uint8_t unk06; // 06
26  std::uint8_t unk07; // 07
27  std::uint8_t unk08; // 08
28  std::uint8_t unk09; // 09
29  std::uint16_t unk0A; // 0A
32  std::uint32_t pad14; // 14
34  std::uint64_t unkA8; // A8
35  std::uint32_t unkB0; // B0
36  private:
37  KEEP_FOR_RE()
38  };
39  static_assert(sizeof(VATSCommand) == 0xB8);
40 
41  class VATS : public BSTSingletonSDM<VATS>
42  {
43  public:
44  enum class VATS_MODE : std::uint32_t
45  {
46  kNone = 0,
47  kKillCam = 4
48  };
49 
50  [[nodiscard]] static VATS* GetSingleton()
51  {
52  REL::Relocation<VATS**> singleton{ RELOCATION_ID(514725, 400883) };
53  return *singleton;
54  }
55 
56  void SetMagicTimeSlowdown(float a_magicTimeSlowdown, float a_playerMagicTimeSlowdown)
57  {
58  using func_t = decltype(&VATS::SetMagicTimeSlowdown);
59  static REL::Relocation<func_t> func{ RELOCATION_ID(43103, 44300) };
60  return func(this, a_magicTimeSlowdown, a_playerMagicTimeSlowdown);
61  }
62 
63  // members
64  std::uint32_t pad00; // 00
67  std::uint32_t pad24; // 24
68  std::uint64_t unk28; // 28
70  float safetyTime; // 38
71  float cameraTime; // 3C
72  float castingAfterKillDelay; // 40
73  std::uint32_t pad44; // 44
74  std::uint64_t unk48; // 48
75  std::uint64_t unk50; // 50
76  std::uint64_t unk58; // 58
77  ImageSpaceModifierInstanceRB* unk60; // 60
78  ImageSpaceModifierInstanceRB* unk68; // 68
80  bool unk78; // 78
81  bool unk79; // 79
82  std::uint16_t pad7A; // 7A
83  std::int32_t unk7C; // 7C
84  float magicTimeSlowdown; // 80
89  std::int32_t unkA0; // A0
90  std::uint32_t padA4; // A4
92  NiPointer<Actor> unkB0; // B0 - stranger?
93  mutable BSSpinLock lock; // B8
94  private:
95  KEEP_FOR_RE()
96  };
97  static_assert(sizeof(VATS) == 0xC0);
98 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:702
Definition: Relocation.h:210
Definition: BGSCameraShot.h:15
Definition: BSAtomic.h:92
Definition: BSTArray.h:378
Definition: ExtraDataList.h:51
Definition: HitData.h:17
Definition: NiSmartPointer.h:9
Definition: TESBoundObject.h:26
Definition: VATS.h:20
std::uint8_t unk07
Definition: VATS.h:26
std::uint32_t actionPoints
Definition: VATS.h:22
std::uint16_t unk0A
Definition: VATS.h:29
ActorValue bodyPartAV
Definition: VATS.h:31
std::uint8_t unk05
Definition: VATS.h:24
std::uint8_t unk08
Definition: VATS.h:27
std::uint8_t unk06
Definition: VATS.h:25
std::uint64_t unkA8
Definition: VATS.h:34
std::uint8_t unk04
Definition: VATS.h:23
HitData hitData
Definition: VATS.h:33
std::uint32_t unkB0
Definition: VATS.h:35
std::uint32_t pad14
Definition: VATS.h:32
std::uint8_t unk09
Definition: VATS.h:28
ObjectRefHandle targetHandle
Definition: VATS.h:30
Definition: VATS.h:42
float cameraTime
Definition: VATS.h:71
std::uint32_t pad44
Definition: VATS.h:73
NiPointer< Actor > attacker
Definition: VATS.h:91
std::uint64_t unk48
Definition: VATS.h:74
TESBoundObject * item
Definition: VATS.h:86
NiPointer< Actor > unkB0
Definition: VATS.h:92
std::uint32_t pad24
Definition: VATS.h:67
NiPointer< Actor > target
Definition: VATS.h:88
std::uint64_t unk50
Definition: VATS.h:75
ImageSpaceModifierInstanceRB * unk68
Definition: VATS.h:78
BGSCameraShot * cameraShot
Definition: VATS.h:69
std::uint64_t unk28
Definition: VATS.h:68
ExtraDataList * extraList
Definition: VATS.h:87
bool unk78
Definition: VATS.h:80
ImageSpaceModifierInstanceRB * unk60
Definition: VATS.h:77
NiPointer< BSLight > VATSLight
Definition: VATS.h:79
std::int32_t unk7C
Definition: VATS.h:83
bool unk79
Definition: VATS.h:81
float castingAfterKillDelay
Definition: VATS.h:72
void SetMagicTimeSlowdown(float a_magicTimeSlowdown, float a_playerMagicTimeSlowdown)
Definition: VATS.h:56
std::uint32_t padA4
Definition: VATS.h:90
VATS_MODE VATSMode
Definition: VATS.h:66
std::uint64_t unk58
Definition: VATS.h:76
std::uint32_t pad00
Definition: VATS.h:64
std::uint16_t pad7A
Definition: VATS.h:82
BSSpinLock lock
Definition: VATS.h:93
float magicTimeSlowdown
Definition: VATS.h:84
static VATS * GetSingleton()
Definition: VATS.h:50
float playerMagicTimeSlowdown
Definition: VATS.h:85
std::int32_t unkA0
Definition: VATS.h:89
float safetyTime
Definition: VATS.h:70
VATS_MODE
Definition: VATS.h:45
BSTArray< BSTSmartPointer< VATSCommand > > commandList
Definition: VATS.h:65
Definition: AbsorbEffect.h:6
ActorValue
Definition: ActorValues.h:6
Definition: BSTSingleton.h:50