X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fmoving.c;h=e966bed76a47899bb6633828656301df8f619ee3;hp=5c9f67dde508bc02a1ff01b1f9d82ee9851378c0;hb=dc45b3ccf42344c238ddb146d79dc62086624848;hpb=459d6afcbe13be588b29c8bd1fbffb39b13fdee1 diff --git a/src/moving.c b/src/moving.c index 5c9f67d..e966bed 100644 --- a/src/moving.c +++ b/src/moving.c @@ -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);