No need to update the ship if we reset.

This commit is contained in:
Nicolás Ortega Froysa 2018-03-29 12:58:37 +02:00
parent 609d197227
commit 17777e2178
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -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.
*/
else
ship_update(&ship);
al_clear_to_color(al_map_rgb(0, 0, 0));
ship_draw(&ship);
if(show_info)