More int-to-boolean cleanup. Make the FDISTR event work.
[super-star-trek.git] / src / moving.c
index 5c9f67dde508bc02a1ff01b1f9d82ee9851378c0..e966bed76a47899bb6633828656301df8f619ee3 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();
@@ -523,7 +523,7 @@ void warp(int i)
            game.ididit = 0;
            skip(1);
            prout("Engineering to bridge--");
-           if (game.shldup==0 || 0.5*power > game.energy) {
+           if (!game.shldup || 0.5*power > game.energy) {
                iwarp = pow((game.energy/(game.dist+0.05)), 0.333333333);
                if (iwarp <= 0) {
                    prout("We can't do it, Captain. We haven't the energy.");
@@ -749,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);