]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/mfir.c
fire: Always clear mission when firing
[empserver] / src / lib / commands / mfir.c
index ef88594086fe76746297c16bdf2d1cc3df6c7fcb..3e58b55487aaa74fdccaed18fb74847b017f5704 100644 (file)
@@ -286,6 +286,7 @@ multifire(void)
                }
                dam = shp_fire(&fship);
            }
+           fship.shp_mission = 0;
            putship(fship.shp_uid, &fship);
            if (CANT_HAPPEN(dam < 0)) {
                pr("Klick!     ...\n");
@@ -315,6 +316,7 @@ multifire(void)
            }
 
            dam = lnd_fire(&fland);
+           fland.lnd_mission = 0;
            putland(fland.lnd_uid, &fland);
            if (CANT_HAPPEN(dam < 0)) {
                pr("Klick!     ...\n");
@@ -350,20 +352,6 @@ multifire(void)
        }
        if (trange > range2) {
            pr("Target out of range.\n");
-           switch (type) {
-           case EF_SECTOR:
-               break;
-           case EF_LAND:
-               fland.lnd_mission = 0;
-               putland(fland.lnd_uid, &fland);
-               break;
-           case EF_SHIP:
-               fship.shp_mission = 0;
-               putship(fship.shp_uid, &fship);
-               break;
-           default:
-               CANT_REACH();
-           }
            continue;
        }