]> git.pond.sub.org Git - empserver/commitdiff
fire: Fix artillery splashing the bridge span under itself
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 7 Feb 2015 14:49:03 +0000 (15:49 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:51 +0000 (08:20 +0100)
multifire() writes back the firing sector after applying damage.  When
an artillery unit on a bridge span commits suicide by shelling down
the supporting bridge heads, this writeback puts the bridge span right
back (less the land units and planes on it), triggering a seqno oops.
On the next update of the bridge head, the bridge span falls again.
Broken in commit fe5b266, v4.3.14.

The problematic write back is superfluous.  Remove it along with a few
equally superfluous ones.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/mfir.c

index 788ad2ebcef5b9a6aeaf307c264a9dbda47939b3..ef88594086fe76746297c16bdf2d1cc3df6c7fcb 100644 (file)
@@ -352,7 +352,6 @@ multifire(void)
            pr("Target out of range.\n");
            switch (type) {
            case EF_SECTOR:
-               putsect(&fsect);
                break;
            case EF_LAND:
                fland.lnd_mission = 0;
@@ -437,7 +436,6 @@ multifire(void)
        }
        switch (attgp->ef_type) {
        case EF_SECTOR:
-           putsect(&fsect);
            break;
        case EF_SHIP:
            if ((target == targ_ship) || (target == targ_sub)) {
@@ -445,7 +443,6 @@ multifire(void)
                    shp_missdef(&fship, vict);
                }
            }
-           putship(fship.shp_uid, &fship);
            break;
        default:
            CANT_REACH();