Abstract out damage checks.
[super-star-trek.git] / src / io.c
index dc4ce744fee5cf1350af13c2c991a2096ba46441..ecbe87aff9ddb1d373d471a0925f867d41e4dd4a 100644 (file)
--- a/src/io.c
+++ b/src/io.c
@@ -398,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);