From d7903ec6150407f91c6d14e26b1bd17b0e4beeee Mon Sep 17 00:00:00 2001 From: mcolonna Date: Thu, 17 Oct 2024 12:29:58 +0200 Subject: [PATCH] fix: moving --- move.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/move.c b/move.c index 7d2436e..00edc79 100644 --- a/move.c +++ b/move.c @@ -6,7 +6,7 @@ /* By: mcolonna +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/15 12:47:34 by mcolonna #+# #+# */ -/* Updated: 2024/10/15 18:22:58 by mcolonna ### ########.fr */ +/* Updated: 2024/10/17 12:29:23 by mcolonna ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,7 +22,7 @@ static int move(int factor) (int)(g_map.player.pos.y) )->wall == EMPTY ) - g_map.player.pos.x += dir.x * MOVE_SPEED; + g_map.player.pos.x += dir.x * MOVE_SPEED * factor; if (map_get_case(&g_map, (int)(g_map.player.pos.x), (int)(g_map.player.pos.y + dir.y * MOVE_SPEED * factor)