summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp15
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