diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-01 21:12:44 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-01 21:12:44 +0200 |
commit | 6e3e7552e67dfc0254c3e99bcd32fea02f10d062 (patch) | |
tree | 84bfd40d2c2693cab44a47d4902aa601d8a715e6 /src/Mobs/Monster.cpp | |
parent | d (diff) | |
parent | SetSwimState now takes into account head height (diff) | |
download | cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.tar cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.tar.gz cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.tar.bz2 cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.tar.lz cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.tar.xz cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.tar.zst cuberite-6e3e7552e67dfc0254c3e99bcd32fea02f10d062.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r-- | src/Mobs/Monster.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 51bc0637b..f16120b55 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1331,9 +1331,24 @@ void cMonster::AttachTickBehavior(cBehavior * a_Behavior) void cMonster::AttachDestroyBehavior(cBehavior * a_Behavior) { +<<<<<<< HEAD ASSERT(a_Behavior != nullptr); m_AttachedDestroyBehaviors.push_back(a_Behavior); } +======= + // If the Y coord is out of range, return the most logical result without considering anything else: + int RelY = FloorC(a_Location.y); + if (RelY >= cChunkDef::Height) + { + // Always burn above the world + return true; + } + if (RelY <= 0) + { + // The mob is about to die, no point in burning + return false; + } +>>>>>>> master |