From 17777e21783e346a9c701abe324a6d64178dc8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 29 Mar 2018 12:58:37 +0200 Subject: [PATCH] No need to update the ship if we reset. --- src/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index 95ed5f0..fa94a61 100644 --- a/src/main.c +++ b/src/main.c @@ -113,12 +113,9 @@ int main() { { if(key_is_down(KEY_RESET)) ship_init(&ship, WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2); - /* - * We only run the simulation when the timer goes off so it's - * running at a consistent rate, rather than dependent on random - * events. - */ - ship_update(&ship); + else + ship_update(&ship); + al_clear_to_color(al_map_rgb(0, 0, 0)); ship_draw(&ship); if(show_info)