From: Joshua Grams Date: Sat, 23 Apr 2005 16:35:27 +0000 (+0000) Subject: * main.c (gameloop): now stops scrolling up/down when you die. X-Git-Tag: 0.3~19 X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=commitdiff_plain;h=3814fd00ef6b0a4f5a9d83b5b42d494bc64da668 * main.c (gameloop): now stops scrolling up/down when you die. (dist_sq): unnecessary, removed. --- diff --git a/main.c b/main.c index 0486c7e..309da05 100644 --- a/main.c +++ b/main.c @@ -111,11 +111,6 @@ char *data_dir; extern char *optarg; extern int optind, opterr, optopt; -float dist_sq(float x1, float y1, float x2, float y2) -{ - return (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1); -} - // ************************************* FUNCS float @@ -775,6 +770,8 @@ gameloop() { // Play the explosion sound play_sound(0); makebangdots(shipx,shipy,shipdx,shipdy,surf_ship,30); + shipdx = 0; + shipdy = 0; if(--nships <= 0) { gameover = 1; state = GAME_OVER; @@ -785,8 +782,6 @@ gameloop() { else { state = DEAD_PAUSE; state_timeout = DEAD_PAUSE_LENGTH; - shipdx = 0; - shipdy = 0; } }