]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/mfir.c
fire: Print "Kaboom" even when the target is out of range
[empserver] / src / lib / commands / mfir.c
index 2cd3a810d9adc5a41fecac07e28bd61e1af69b81..527dba16b15ccdb9349bfe62229f423568ffb2d5 100644 (file)
@@ -338,17 +338,6 @@ multifire(void)
            pr("range is %d.00 (%.2f)\n", range2, range);
        }
 
-       /*
-        * If the player fires guns at a submarine, take care not to
-        * disclose it's a submarine: pretend the target is out of range.
-        */
-       if (target == targ_ship && (mchr[vship.shp_type].m_flags & M_SUB))
-           range2 = -1;
-       if (trange > range2) {
-           pr("Target out of range.\n");
-           continue;
-       }
-
        nfiring++;
        switch (target) {
        case targ_sub:
@@ -361,6 +350,17 @@ multifire(void)
            break;
        }
 
+       /*
+        * If the player fires guns at a submarine, take care not to
+        * disclose it's a submarine: pretend the target is out of range.
+        */
+       if (target == targ_ship && (mchr[vship.shp_type].m_flags & M_SUB))
+           range2 = -1;
+       if (trange > range2) {
+           pr("Target out of range.\n");
+           continue;
+       }
+
        switch (target) {
        case targ_bogus:
        case targ_land: