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.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 788d1b66f..d14746513 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -227,8 +227,18 @@ void cMonster::MoveToWayPoint(cChunk & a_Chunk)
// Don't let the mob move too much if he's falling.
Distance *= 0.25f;
}
- // Apply walk speed:
- Distance *= m_RelativeWalkSpeed;
+
+ if ((m_EMState == CHASING) || (m_EMState == ESCAPING))
+ {
+ // Apply run speed:
+ Distance *= m_BaseRunSpeed * m_RelativeWalkSpeed;
+ }
+ else
+ {
+ // Apply walk speed:
+ Distance *= m_BaseWalkSpeed * m_RelativeWalkSpeed;
+ }
+
/* Reduced default speed.
Close to Vanilla, easier for mobs to follow m_NextWayPointPositions, hence
better pathfinding. */