summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PassiveMonster.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-07 18:07:14 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-19 06:05:22 +0100
commit83459d0d899786378e8304c92a5b79ddca92c62f (patch)
tree637e5302c5c5affc5f3c52d4c195cba5607aac30 /src/Mobs/PassiveMonster.cpp
parentMerge pull request #3020 from cuberite/ice_block (diff)
downloadcuberite-83459d0d899786378e8304c92a5b79ddca92c62f.tar
cuberite-83459d0d899786378e8304c92a5b79ddca92c62f.tar.gz
cuberite-83459d0d899786378e8304c92a5b79ddca92c62f.tar.bz2
cuberite-83459d0d899786378e8304c92a5b79ddca92c62f.tar.lz
cuberite-83459d0d899786378e8304c92a5b79ddca92c62f.tar.xz
cuberite-83459d0d899786378e8304c92a5b79ddca92c62f.tar.zst
cuberite-83459d0d899786378e8304c92a5b79ddca92c62f.zip
Diffstat (limited to 'src/Mobs/PassiveMonster.cpp')
-rw-r--r--src/Mobs/PassiveMonster.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Mobs/PassiveMonster.cpp b/src/Mobs/PassiveMonster.cpp
index 53288a54c..000f3d5a4 100644
--- a/src/Mobs/PassiveMonster.cpp
+++ b/src/Mobs/PassiveMonster.cpp
@@ -65,6 +65,18 @@ void cPassiveMonster::ResetLoveMode()
+void cPassiveMonster::Destroyed()
+{
+ if (m_LovePartner != nullptr)
+ {
+ m_LovePartner->ResetLoveMode();
+ }
+}
+
+
+
+
+
void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
@@ -73,10 +85,6 @@ void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
CheckEventLostPlayer();
}
- if ((m_LovePartner != nullptr) && m_LovePartner->IsDestroyed())
- {
- m_LovePartner = nullptr;
- }
// if we have a partner, mate
if (m_LovePartner != nullptr)