diff --git a/src/object/bigsnowball.cpp b/src/object/bigsnowball.cpp index b7966decfde..92e42e4fe59 100644 --- a/src/object/bigsnowball.cpp +++ b/src/object/bigsnowball.cpp @@ -15,6 +15,7 @@ #include "object/bigsnowball.hpp" +#include "badguy/badguy.hpp" #include "badguy/yeti.hpp" #include "math/random.hpp" #include "math/util.hpp" @@ -126,6 +127,13 @@ BigSnowball::collision(GameObject& other, const CollisionHit& hit) return ABORT_MOVE; } + auto badguy = dynamic_cast(&other); // cppcheck-suppress constVariablePointer + if (badguy && ((m_dir == Direction::LEFT && hit.left) || (m_dir == Direction::RIGHT && hit.right) || hit.bottom)) + { + badguy->kill_fall(); + return ABORT_MOVE; + } + auto player = dynamic_cast(&other); // cppcheck-suppress constVariablePointer if (player && player->m_does_buttjump && hit.top) {