summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorChaser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorChaser.cpp')
-rw-r--r--src/Mobs/Behaviors/BehaviorChaser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Mobs/Behaviors/BehaviorChaser.cpp b/src/Mobs/Behaviors/BehaviorChaser.cpp
index 8e2a70bd4..dd9f193d6 100644
--- a/src/Mobs/Behaviors/BehaviorChaser.cpp
+++ b/src/Mobs/Behaviors/BehaviorChaser.cpp
@@ -23,9 +23,10 @@ cBehaviorChaser::cBehaviorChaser() :
-void cBehaviorChaser::AttachToMonster(cMonster & a_Parent)
+void cBehaviorChaser::AttachToMonster(cMonster & a_Parent, cBehaviorStriker & a_ParentStriker)
{
m_Parent = &a_Parent;
+ m_ParentStriker = &a_ParentStriker;
m_Parent->AttachTickBehavior(this);
m_Parent->AttachDestroyBehavior(this);
m_Parent->AttachPostTickBehavior(this);
@@ -245,7 +246,7 @@ void cBehaviorChaser::StrikeTarget()
{
if (m_AttackCoolDownTicksLeft != 0)
{
- cBehaviorStriker * Striker = m_Parent->GetBehaviorStriker();
+ cBehaviorStriker * Striker = m_ParentStriker;
if (Striker != nullptr)
{
// Striker->Strike(m_Target); //mobTodo