summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Behaviors/BehaviorDayLightBurner.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-24 14:50:17 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-24 14:50:17 +0200
commit7f5058f1872e1ecc2ea9b897e32708903480e702 (patch)
treeeb413f839b0e36c1bc05cb3c3e6bf2435a70810c /src/Mobs/Behaviors/BehaviorDayLightBurner.cpp
parentMerge branch 'master' into mobs2 (diff)
downloadcuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.tar
cuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.tar.gz
cuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.tar.bz2
cuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.tar.lz
cuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.tar.xz
cuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.tar.zst
cuberite-7f5058f1872e1ecc2ea9b897e32708903480e702.zip
Diffstat (limited to 'src/Mobs/Behaviors/BehaviorDayLightBurner.cpp')
-rw-r--r--src/Mobs/Behaviors/BehaviorDayLightBurner.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Mobs/Behaviors/BehaviorDayLightBurner.cpp b/src/Mobs/Behaviors/BehaviorDayLightBurner.cpp
index b28c3c49c..efa4b6518 100644
--- a/src/Mobs/Behaviors/BehaviorDayLightBurner.cpp
+++ b/src/Mobs/Behaviors/BehaviorDayLightBurner.cpp
@@ -7,11 +7,20 @@
#include "../../Chunk.h"
-cBehaviorDayLightBurner::cBehaviorDayLightBurner(cMonster * a_Parent) : m_Parent(a_Parent)
+
+
+
+
+void cBehaviorDayLightBurner::AttachToMonster(cMonster & a_Parent)
{
- ASSERT(m_Parent != nullptr);
+ m_Parent = &a_Parent;
+ m_Parent->AttachPostTickBehavior(this);
}
+
+
+
+
void cBehaviorDayLightBurner::PostTick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
// mobTodo WouldBurn