From: Eric S. Raymond Date: Sun, 6 Feb 2005 22:04:32 +0000 (+0000) Subject: Quiet the sensors. X-Git-Tag: 2.0~349 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=29e44720be26859f91e028a538336493368756b3;p=super-star-trek.git Quiet the sensors. --- diff --git a/io.c b/io.c index fc173f7..4830ea4 100644 --- a/io.c +++ b/io.c @@ -300,8 +300,8 @@ void drawmaps(short l) /* hook to be called after moving to redraw maps */ { if (curses) { - if (l == 1) - sensor(); + if (l == 1) + sensor(FALSE); if (l != 2) { setwnd(srscan_window); wmove(curwnd, 0, 0); diff --git a/planets.c b/planets.c index aaffdd4..1d1d1b8 100644 --- a/planets.c +++ b/planets.c @@ -84,7 +84,7 @@ void orbit(void) ididit=1; } -void sensor(void) +void sensor(int force) { skip(1); chew(); @@ -92,11 +92,11 @@ void sensor(void) prout("Short range sensors damaged."); return; } - if (plnetx == 0) { + if (!plnetx && ((game.state.plnets[iplnet].known == unknown || force))) { prout("Spock- \"No planet in this quadrant, Captain.\""); return; } - if ((plnetx != 0)&&(game.state.plnets[iplnet].known == 0)) { + if ((plnetx != 0)&&(game.state.plnets[iplnet].known == unknown)) { prout("Spock- \"Sensor scan for %s-", cramlc(quadrant, quadx, quady)); skip(1); prout(" Planet at %s is of class %s.", diff --git a/sst.c b/sst.c index 23e1001..8d30bde 100644 --- a/sst.c +++ b/sst.c @@ -372,7 +372,7 @@ static void makemoves(void) { score(); break; case SENSORS: // sensors - sensor(); + sensor(TRUE); break; case ORBIT: // orbit orbit(); diff --git a/sst.h b/sst.h index 5b68074..4a53063 100644 --- a/sst.h +++ b/sst.h @@ -451,7 +451,7 @@ void prouts(char *, ...); int isit(char *); void preport(void); void orbit(void); -void sensor(void); +void sensor(int); void drawmaps(short); void beam(void); void mine(void);