From 0911072d27820bd608bb908088419d3ec5151434 Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 4 Aug 2014 01:34:12 +0200 Subject: Attempt to fix knockback and swimming. --- src/Mobs/Monster.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/Mobs') diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 94df991a3..66c9aadeb 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -292,6 +292,10 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk) { Distance *= 2.5; } + else if (IsSwimming()) + { + Distance *= 1.3; + } else { // Don't let the mob move too much if he's falling. @@ -301,11 +305,13 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk) AddSpeedX(Distance.x); AddSpeedZ(Distance.z); - if (m_EMState == ESCAPING) - { // Runs Faster when escaping :D otherwise they just walk away + /* It's too buggy! */ + /** if (m_EMState == ESCAPING) + { + // Runs Faster when escaping :D otherwise they just walk away SetSpeedX (GetSpeedX() * 2.f); SetSpeedZ (GetSpeedZ() * 2.f); - } + } */ } else { -- cgit v1.2.3