Checkpoint with several changes, committed so Stas can play with debug code.
[super-star-trek.git] / src / moving.c
index 42df8c1ea6e45002da883757e72adaaf6b7f1475..01958a144e6cfaaa982496cc9922fbc275312773 100644 (file)
@@ -489,12 +489,12 @@ void impuls(void)
 }
 
 
-void warp(int i
+void warp(bool timewarp
 {
     int blooey=0, twarp=0, iwarp;
     double power;
 
-    if (i!=2) { /* Not WARPX entry */
+    if (!timewarp) { /* Not WARPX entry */
        game.ididit = 0;
        if (game.damage[DWARPEN] > 10.0) {
            chew();
@@ -565,13 +565,11 @@ void warp(int i)
        }
        /* Decide if time warp will occur */
        if (0.5*game.dist*pow(7.0,game.warpfac-10.0) > Rand()) twarp=1;
-#ifdef DEBUG
-       if (game.idebug &&game.warpfac==10 && twarp==0) {
+       if (idebug && game.warpfac==10 && twarp==0) {
            blooey=0;
-           proutn("Force time warp? ");
+           proutn("=== Force time warp? ");
            if (ja()==1) twarp=1;
        }
-#endif
        if (blooey || twarp) {
            /* If time warp or engine damage, check path */
            /* If it is obstructed, don't do warp or damage */
@@ -751,10 +749,10 @@ void atover(int igrab)
        if (distreq < game.dist) game.dist = distreq;
        game.optime = 10.0*game.dist/game.wfacsq;
        game.direc = 12.0*Rand();       /* How dumb! */
-       game.justin = 0;
-       game.inorbit = 0;
-       warp(2);
-       if (game.justin == 0) {
+       game.justin = false;
+       game.inorbit = false;
+       warp(true);
+       if (!game.justin) {
            /* This is bad news, we didn't leave quadrant. */
            if (game.alldone) return;
            skip(1);