X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fio.c;h=ecbe87aff9ddb1d373d471a0925f867d41e4dd4a;hp=5d4ea9a13154752c0ed904fc55f3116ee41fb936;hb=2cae1cd3feb922843b40af851f43f9e08bb18f0d;hpb=fd5a1ba781a0c37fa6181aa8e856d77d321df7a5 diff --git a/src/io.c b/src/io.c index 5d4ea9a..ecbe87a 100644 --- a/src/io.c +++ b/src/io.c @@ -203,7 +203,10 @@ void cgetline(char *line, int max) strcat(line, "\n"); wrefresh(curwnd); } else { - fgets(line, max, stdin); + if (replayfp && !feof(replayfp)) + fgets(line, max, replayfp); + else + fgets(line, max, stdin); } if (logfp) fputs(line, logfp); @@ -395,7 +398,7 @@ void tracktorpedo(int ix, int iy, int l, int i, int n, int iquad) skip(1); proutn("%d - %d ", ix, iy); } else { - if (game.damage[DSRSENS]==0 || game.condit==IHDOCKED) { + if (!damaged(DSRSENS) || game.condit==IHDOCKED) { if (i != 1 && l == 1) { drawmaps(2); delay(400);