diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-24 22:21:25 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-24 22:21:25 +0200 |
commit | 810230b5466f1363d69763670fc9b85fa385c99a (patch) | |
tree | a9d4dcfd43ac28ef2fb9e61e73a34f7246a695bb /src/Mobs/Behaviors/BehaviorChaser.cpp | |
parent | Merge branch 'master' into mobs2 (diff) | |
download | cuberite-810230b5466f1363d69763670fc9b85fa385c99a.tar cuberite-810230b5466f1363d69763670fc9b85fa385c99a.tar.gz cuberite-810230b5466f1363d69763670fc9b85fa385c99a.tar.bz2 cuberite-810230b5466f1363d69763670fc9b85fa385c99a.tar.lz cuberite-810230b5466f1363d69763670fc9b85fa385c99a.tar.xz cuberite-810230b5466f1363d69763670fc9b85fa385c99a.tar.zst cuberite-810230b5466f1363d69763670fc9b85fa385c99a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Behaviors/BehaviorChaser.cpp | 5 |
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 |