diff options
author | Mattes D <github@xoft.cz> | 2014-09-13 17:05:59 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-13 17:05:59 +0200 |
commit | 5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b (patch) | |
tree | fcf2f5efe358c8c9ab7e3f54bc3a95a257e9f899 /src/Mobs/Monster.cpp | |
parent | Gittip is now Gratipay (diff) | |
parent | Added extra mushroom handler. (diff) | |
download | cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.tar cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.tar.gz cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.tar.bz2 cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.tar.lz cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.tar.xz cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.tar.zst cuberite-5b63a7fe9864a7b1afdf526a2b3b6d29ed991b9b.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r-- | src/Mobs/Monster.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index f7ee0b0c0..7e40794b1 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_RelativeWalkSpeed(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_RelativeWalkSpeed; + AddSpeedX(Distance.x); AddSpeedZ(Distance.z); |