CommonLibSSE NG
CombatController.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/AITimer.h"
4 #include "RE/B/BSAtomic.h"
5 #include "RE/B/BSPointerHandle.h"
6 #include "RE/B/BSTArray.h"
7 #include "RE/C/CombatState.h"
8 #include "RE/N/NiSmartPointer.h"
9 
10 namespace RE
11 {
12  class CombatAimController;
13  class CombatAreaStandard;
14  class CombatBehaviorController;
15  class CombatBlackboard;
16  class CombatGroup;
17  class CombatInventory;
18  class CombatTargetSelectorStandard;
19  class CombatState;
20  class TESCombatStyle;
21 
23  {
24  public:
25  [[nodiscard]] bool IsFleeing() const
26  {
27  return state->isFleeing;
28  }
29 
30  // members
34  CombatBlackboard* blackboard; // 18
35  CombatBehaviorController* behaviorController; // 20
39  std::uint8_t unk34; // 34
40  bool startedCombat; // 35
41  std::uint8_t unk36; // 36
42  std::uint8_t unk37; // 37
44  bool stoppedCombat; // 40
45  bool unk41; // 41 - isbeingMeleeAttacked?
46  bool ignoringCombat; // 42
47  bool inactive; // 43
48  AITimer unk44; // 44
49  float unk4C; // 4C
51 #ifdef SKYRIM_SUPPORT_AE
52  mutable BSSpinLock aimControllerLock; // 68
53 #endif
54  CombatAimController* currentAimController; // 68
55  CombatAimController* previousAimController; // 70
57  CombatAreaStandard* currentArea; // 90
59  CombatTargetSelectorStandard* currentTargetSelector; // B0
60  CombatTargetSelectorStandard* previousTargetSelector; // B8
61  std::uint32_t handleCount; // C0
62  std::int32_t unkC4; // C4
63  NiPointer<Actor> cachedAttacker; // C8 - attackerHandle
64  NiPointer<Actor> cachedTarget; // D0 - targetHandle
65  };
66 #ifndef SKYRIM_SUPPORT_AE
67  static_assert(sizeof(CombatController) == 0xD8);
68 #else
69  static_assert(sizeof(CombatController) == 0xE0);
70 #endif
71 }
Definition: BSAtomic.h:51
Definition: CombatController.h:23
bool IsFleeing() const
Definition: CombatController.h:25
CombatInventory * inventory
Definition: CombatController.h:33
std::uint8_t unk34
Definition: CombatController.h:39
CombatAimController * previousAimController
Definition: CombatController.h:55
CombatTargetSelectorStandard * previousTargetSelector
Definition: CombatController.h:60
CombatAimController * currentAimController
Definition: CombatController.h:54
CombatState * state
Definition: CombatController.h:32
CombatTargetSelectorStandard * currentTargetSelector
Definition: CombatController.h:59
std::int32_t unkC4
Definition: CombatController.h:62
std::uint8_t unk37
Definition: CombatController.h:42
BSTArray< CombatAreaStandard * > areas
Definition: CombatController.h:56
ActorHandle targetHandle
Definition: CombatController.h:37
NiPointer< Actor > cachedAttacker
Definition: CombatController.h:63
TESCombatStyle * combatStyle
Definition: CombatController.h:43
bool stoppedCombat
Definition: CombatController.h:44
bool startedCombat
Definition: CombatController.h:40
bool ignoringCombat
Definition: CombatController.h:46
CombatGroup * combatGroup
Definition: CombatController.h:31
ActorHandle attackerHandle
Definition: CombatController.h:36
CombatBlackboard * blackboard
Definition: CombatController.h:34
CombatBehaviorController * behaviorController
Definition: CombatController.h:35
bool unk41
Definition: CombatController.h:45
CombatAreaStandard * currentArea
Definition: CombatController.h:57
std::uint8_t unk36
Definition: CombatController.h:41
BSTArray< CombatTargetSelectorStandard * > targetSelectors
Definition: CombatController.h:58
bool inactive
Definition: CombatController.h:47
AITimer unk44
Definition: CombatController.h:48
float unk4C
Definition: CombatController.h:49
BSTArray< CombatAimController * > aimControllers
Definition: CombatController.h:50
NiPointer< Actor > cachedTarget
Definition: CombatController.h:64
std::uint32_t handleCount
Definition: CombatController.h:61
ActorHandle previousTargetHandle
Definition: CombatController.h:38
Definition: CombatGroup.h:70
Definition: CombatInventory.h:40
Definition: CombatState.h:26
bool isFleeing
Definition: CombatState.h:30
Definition: NiSmartPointer.h:9
Definition: TESCombatStyle.h:65
Definition: AbsorbEffect.h:6
Definition: AITimer.h:6