More int-to-boolean cleanup. Make the FDISTR event work.
[super-star-trek.git] / src / reports.c
index 8e4f070e02ab5c21a2e7431c482dfb8cc6fbef32..e1b6cc710cf2e69349d553358961e4e8bb1e9932 100644 (file)
@@ -21,7 +21,7 @@ void attakreport(int curt)
     } else {
         if (is_scheduled(FCDBAS))
            proutn("Base in %i - %i attacked by C. Alive until %.1f", game.battle.x, game.battle.y, scheduled(FCDBAS));
-        if (game.isatb == 1)
+        if (game.isatb)
            proutn("Base in %i - %i attacked by S. Alive until %.1f", game.state.kscmdr.x, game.state.kscmdr.y, scheduled(FSCDBAS));
     }
     clreol();
@@ -316,8 +316,8 @@ static void status(int req)
        break;
     case 10:
        if (game.options & OPTION_WORLDS) {
-           planet *here = game.state.galaxy[game.quadrant.x][game.quadrant.y].planet;
-           if (here && here->inhabited != UNINHABITED)
+           int here = game.state.galaxy[game.quadrant.x][game.quadrant.y].planet;
+           if (here != NOPLANET && game.state.plnets[here].inhabited != UNINHABITED)
                proutn("Major system  %s", systemname(here));
            else
                proutn("Sector is uninhabited");
@@ -488,7 +488,7 @@ void eta(void)
        tpower = game.dist*twarp*twarp*twarp*(game.shldup+1);
        if (tpower >= game.energy) {
            prout("Insufficient energy, sir.");
-           if (game.shldup==0 || tpower > game.energy*2.0) {
+           if (!game.shldup || tpower > game.energy*2.0) {
                if (!wfl) return;
                proutn("New warp factor to try? ");
                if (scan() == IHREAL) {