diff --git a/src/player.c b/src/player.c index 0c09e6a..643d25a 100644 --- a/src/player.c +++ b/src/player.c @@ -84,7 +84,8 @@ void player_move(Player *player, const Level *level) { if (PLAYER_COLLIDE_SOLID(destination)) { /* Used for clipping and positionning. */ int offset = destination.y % TILE_SIZE; - if (offset > H_CLIP_MARGIN) { + /* If player is rising or offset is too high then don't clip. */ + if (player->spd.y < 0 || offset > H_CLIP_MARGIN) { offset = 0; } destination.y -= offset;