diff --git a/source/player.cpp b/source/player.cpp index e7a0f06..9e4556a 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -197,17 +197,11 @@ void Player::move() // Recoloca if (vx > 0) { - do - { - x--; - } while (checkMapCollisions()); + x -= ((int)x + w) % tile; } else { - do - { - x++; - } while (checkMapCollisions()); + x += tile - ((int)x % tile); } vx = 0.0f;