summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorItemFollower.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorItemFollower.cpp')
-rw-r--r--src/Mobs/Behaviors/BehaviorItemFollower.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Mobs/Behaviors/BehaviorItemFollower.cpp b/src/Mobs/Behaviors/BehaviorItemFollower.cpp
index c6cb0df04..d10b46776 100644
--- a/src/Mobs/Behaviors/BehaviorItemFollower.cpp
+++ b/src/Mobs/Behaviors/BehaviorItemFollower.cpp
@@ -6,11 +6,10 @@
#include "../../Entities/Player.h"
-cBehaviorItemFollower::cBehaviorItemFollower(cMonster * a_Parent) :
- m_Parent(a_Parent)
+void cBehaviorItemFollower::AttachToMonster(cMonster & a_Parent)
{
- m_Parent = a_Parent;
- ASSERT(m_Parent != nullptr);
+ m_Parent = &a_Parent;
+ m_Parent->AttachTickBehavior(this);
}