JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
dying explosion faster
[vor.git] / main.c
diff --git a/main.c b/main.c
index 68c77a4..97f7a67 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1005,8 +1005,6 @@ int gameloop() {
                                                state = GAMEPLAY;
                                                play_tune(1);
                                                xship -= 50;
-                                               // xvel = 3;
-                                               // yvel = 0;
                                        break;
                                        case GAME_OVER:
                                                state = HIGH_SCORE_ENTRY;
@@ -1053,7 +1051,8 @@ int gameloop() {
                                }
                        } else {
                                if(state == DEAD_PAUSE) {
-                                       float blast_radius = START_RAD * state_timeout / 50.0;
+                                       float blast_radius = START_RAD * state_timeout / 20.0;
+                                       if(xship < 60) xship = 60;
                                        for(i = 0; i<MAXROCKS; i++ ) {
                                                float dx, dy, n;
                                                if(rock[i].x <= 0) continue;
@@ -1061,7 +1060,7 @@ int gameloop() {
                                                dy = rock[i].y - yship;
                                                n = sqrt(dx*dx + dy*dy);
                                                if(n < blast_radius) {
-                                                       n *= 50;
+                                                       n *= 20;
                                                        rock[i].xvel += rockrate*(dx+30)/n;
                                                        rock[i].yvel += rockrate*dy/n;
                                                        rock[i].dead = 1;
@@ -1118,7 +1117,7 @@ int gameloop() {
                        for(i = 0; i<MAXROCKS; i++) if(rock[i].active) {
                                rock[i].x += rock[i].xvel*movementrate;
                                rock[i].y += rock[i].yvel*movementrate + yscroll;
-                               if(rock[i].dead && rock[i].y < 0 || rock[i].y > YSIZE) rock[i].active = 0;
+                               if(rock[i].dead && (rock[i].y < 0 || rock[i].y > YSIZE)) rock[i].active = 0;
                                if(rock[i].y > YSIZE) {
                                        rock[i].y -= YSIZE;
                                        rock[i].y -= rock[i].image->w;
@@ -1160,7 +1159,7 @@ int gameloop() {
                                }
                                else {
                                        state = DEAD_PAUSE;
-                                       state_timeout = 50.0;
+                                       state_timeout = 20.0;
                                        xvel = 0;
                                        yvel = 0;
                                }