diff --git a/mario/mario.cpp b/mario/mario.cpp index 8d2a4a0..caf0805 100644 --- a/mario/mario.cpp +++ b/mario/mario.cpp @@ -11,7 +11,7 @@ Mario::Mario(const std::shared_ptr< SDLPP::Renderer > &renderer) : SDLPP::Rectan pauseAnimation(); setMovement( 0, 0 ); setMovementSpeed( 1 ); - auto bottom_detect = SDLPP::RectColider( 0.3, 1, 0.4, 0, MARIO_FLOOR_DETECT ); + auto bottom_detect = SDLPP::RectColider( 0.2, 1, 0.6, 0, MARIO_FLOOR_DETECT ); bottom_detect.setMinHeight(1); addCollision(bottom_detect); addCollision( diff --git a/mario/mario_visitor.hpp b/mario/mario_visitor.hpp index 2f88ca7..6c64c1e 100644 --- a/mario/mario_visitor.hpp +++ b/mario/mario_visitor.hpp @@ -45,7 +45,7 @@ public: return top_hit; } bool moveTop() { - return top_left_right; + return top_left_right && !top_hit; } const SDLPP::Vec2D &getRightLeftPos() { return rightleftpos;