diff options
author | Gargaj <gargaj@conspiracy.hu> | 2015-11-10 14:02:07 +0100 |
---|---|---|
committer | Gargaj <gargaj@conspiracy.hu> | 2015-12-13 15:16:15 +0100 |
commit | 66e65898838e3d5d40dfb225fd6c34f0f354b2e3 (patch) | |
tree | 159a72d2f877d4672d1a633853584c5b5e723f21 /src/Mobs/Monster.cpp | |
parent | Merge pull request #2743 from SafwatHalaby/wart (diff) | |
download | cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.tar cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.tar.gz cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.tar.bz2 cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.tar.lz cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.tar.xz cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.tar.zst cuberite-66e65898838e3d5d40dfb225fd6c34f0f354b2e3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Monster.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 2e365e987..fa36285ba 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -77,7 +77,6 @@ cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const A , m_Target(nullptr) , m_PathFinder(a_Width, a_Height) , m_PathfinderActivated(false) - , m_LastGroundHeight(POSY_TOINT) , m_JumpCoolDown(0) , m_IdleInterval(0) , m_DestroyTimer(0) @@ -298,7 +297,6 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) } SetPitchAndYawFromDestination(a_IsFollowingPath); - HandleFalling(); switch (m_EMState) { @@ -397,20 +395,8 @@ void cMonster::SetPitchAndYawFromDestination(bool a_IsFollowingPath) void cMonster::HandleFalling() { - if (m_bOnGround) - { - int Damage = (m_LastGroundHeight - POSY_TOINT) - 3; - - if (Damage > 0) - { - TakeDamage(dtFalling, nullptr, Damage, Damage, 0); - - // Fall particles - GetWorld()->BroadcastSoundParticleEffect(EffectID::PARTICLE_FALL_PARTICLES, POSX_TOINT, POSY_TOINT - 1, POSZ_TOINT, Damage /* Used as particle effect speed modifier */); - } - - m_LastGroundHeight = POSY_TOINT; - } + m_bTouchGround = IsOnGround(); + super::HandleFalling(); } |