collisions happen properly now
This commit is contained in:
@@ -122,12 +122,12 @@ void render_loop(int speed) {
|
||||
obstacle_pool[i].data.y,
|
||||
obstacle_pool[i].type);
|
||||
|
||||
if (check_collision(draw_pos, frame.movement, obstacle_pool[i].data)) {
|
||||
printf("\033[2J\033[H"); // clear screen & home cursor
|
||||
printf("GAME OVER\r\n");
|
||||
game_over = true;
|
||||
break;
|
||||
}
|
||||
if (check_collision(pos, frame.movement, obstacle_pool[i].data)) {
|
||||
printf("\033[2J\033[H");
|
||||
printf("GAME OVER\r\n");
|
||||
game_over = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (game_over)
|
||||
|
||||
Reference in New Issue
Block a user