From de8c2e6fde4e326e3833e38ba71c87620fc51b28 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Thu, 30 Jan 2014 14:32:13 +0100 Subject: [PATCH] [Issue 3] Fix for jittering when there are slopes that end in a wall --- src/object/player.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/object/player.cpp b/src/object/player.cpp index 6c193d705..a40897536 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -1105,8 +1105,10 @@ Player::draw(DrawingContext& context) else if ((wants_buttjump || does_buttjump) && is_big()) { sprite->set_action(sa_prefix+"-buttjump"+sa_postfix); } - else if (!on_ground()) { - sprite->set_action(sa_prefix+"-jump"+sa_postfix); + else if (!on_ground() || fall_mode != ON_GROUND) { + if(physic.get_velocity_x() != 0 || fall_mode != ON_GROUND) { + sprite->set_action(sa_prefix+"-jump"+sa_postfix); + } } else { if (fabsf(physic.get_velocity_x()) < 1.0f) { -- 2.11.0