From ef93ab8638e4b2526bfbbea9788cd884fc362bbb Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Wed, 15 May 2024 15:09:01 +0200 Subject: Change collision function input to t_collider --- src/player_process.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/player_process.c') diff --git a/src/player_process.c b/src/player_process.c index c66d13d..0194d59 100644 --- a/src/player_process.c +++ b/src/player_process.c @@ -6,7 +6,7 @@ /* By: dkaiser player; player->direction = get_direction_from_input(game); player->velocity.x = player->direction.x * PLAYER_MOVE_SPEED; player->velocity.y += 50; - if (player->direction.y == -1 && is_on_floor(player->position, player->size, - &game->map)) + c.position = player->position; + c.size = player->size; + if (player->direction.y == -1 && is_on_floor(c, &game->map)) player->velocity.y = -1000; move_and_slide(player, &game->map, game->mlx->delta_time); } -- cgit v1.2.3