diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 19:50:09 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 19:50:09 +0200 |
commit | 76d914647cb1cf60558bb0e62f149802a4aae2e0 (patch) | |
tree | a6c0afa0ba902274db0f7983ff9501908fb10cb3 /src | |
parent | Implemented Blaze triple shots (diff) | |
download | cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.tar cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.tar.gz cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.tar.bz2 cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.tar.lz cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.tar.xz cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.tar.zst cuberite-76d914647cb1cf60558bb0e62f149802a4aae2e0.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Mobs/EnderDragon.cpp | 6 | ||||
-rw-r--r-- | src/Mobs/Ocelot.cpp | 2 | ||||
-rw-r--r-- | src/Mobs/Ocelot.h | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp index 902c1d629..f33a9d888 100644 --- a/src/Mobs/EnderDragon.cpp +++ b/src/Mobs/EnderDragon.cpp @@ -11,9 +11,9 @@ cEnderDragon::cEnderDragon(void) : // TODO: Vanilla source says this, but is it right? Dragons fly, they don't stand super(mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", 16.0, 8.0) { - m_EMPersonality = AGGRESSIVE; - m_BehaviorDoNothing.AttachToMonster(*this); - GetMonsterConfig("EnderDragon"); + m_EMPersonality = AGGRESSIVE; + m_BehaviorDoNothing.AttachToMonster(*this); + GetMonsterConfig("EnderDragon"); } diff --git a/src/Mobs/Ocelot.cpp b/src/Mobs/Ocelot.cpp index de776dac6..cf4356f4f 100644 --- a/src/Mobs/Ocelot.cpp +++ b/src/Mobs/Ocelot.cpp @@ -21,6 +21,7 @@ cOcelot::cOcelot(void) : m_OwnerName("") { m_EMPersonality = PASSIVE; + m_BehaviorDoNothing.AttachToMonster(*this); GetMonsterConfig("Ocelot"); } @@ -31,6 +32,7 @@ cOcelot::cOcelot(void) : void cOcelot::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { super::Tick(a_Dt, a_Chunk); + if (!IsTicking()) { // The base class tick destroyed us diff --git a/src/Mobs/Ocelot.h b/src/Mobs/Ocelot.h index d27467683..1c1b383cb 100644 --- a/src/Mobs/Ocelot.h +++ b/src/Mobs/Ocelot.h @@ -3,7 +3,7 @@ #include "Monster.h" #include "../UUID.h" - +#include "Behaviors/BehaviorDoNothing.h" @@ -68,6 +68,9 @@ protected: int m_CheckPlayerTickCount; AString m_OwnerName; cUUID m_OwnerUUID; + +private: + cBehaviorDoNothing m_BehaviorDoNothing; } ; |