summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-30 12:44:54 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-30 12:44:54 +0200
commitd7ee2245e89ce9e71f0172d5a0edf605060bcf2a (patch)
treece2cacbe53770fd5f9905a6193c423a5da82b362 /src/Mobs/Monster.cpp
parentMerge branch 'master' into Effects (diff)
downloadcuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.tar
cuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.tar.gz
cuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.tar.bz2
cuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.tar.lz
cuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.tar.xz
cuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.tar.zst
cuberite-d7ee2245e89ce9e71f0172d5a0edf605060bcf2a.zip
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index f7ee0b0c0..09a22cd35 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -89,6 +89,7 @@ cMonster::cMonster(const AString & a_ConfigName, eType a_MobType, const AString
, m_DropChanceBoots(0.085f)
, m_CanPickUpLoot(true)
, m_BurnsInDaylight(false)
+ , m_WalkSpeed(1.0)
{
if (!a_ConfigName.empty())
{
@@ -302,6 +303,9 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
Distance *= 0.25f;
}
+ // Apply walk speed:
+ Distance *= m_WalkSpeed;
+
AddSpeedX(Distance.x);
AddSpeedZ(Distance.z);