]> git.pond.sub.org Git - empserver/commitdiff
Don't beep when plane, land unit or nuke die on collapsing bridge
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Jun 2010 20:26:02 +0000 (22:26 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 27 Jun 2010 16:27:48 +0000 (18:27 +0200)
Not nice, because it could beep many times, and could put beeps in
bulletins.  Moreover, it misused mpr() and thus put the beep in its
own bulletin.  The read command normally merges this bulletin with the
adjacent ones, but if the bulletins are more than five seconds apart
(clock jumped somehow), we can get an empty bulletin just for the
beep.

Beeping was added in v4.0.18.

src/lib/subs/bridgefall.c

index 664ba66f9b34e0be248a7258ba318e75ef5ebca2..068039ebda6bf704bcc25f765c34c6e223636295 100644 (file)
@@ -122,7 +122,6 @@ knockdown(struct sctstr *sp)
     struct plnstr plane;
     struct nukstr nuke;
     struct nstr_item ni;
     struct plnstr plane;
     struct nukstr nuke;
     struct nstr_item ni;
-    struct natstr *np;
 
     mpr(sp->sct_own,
        "Crumble... SCREEEECH!  Splash! Bridge%s falls at %s!\n",
 
     mpr(sp->sct_own,
        "Crumble... SCREEEECH!  Splash! Bridge%s falls at %s!\n",
@@ -144,9 +143,6 @@ knockdown(struct sctstr *sp)
            continue;
        if (land.lnd_ship >= 0)
            continue;
            continue;
        if (land.lnd_ship >= 0)
            continue;
-       np = getnatp(land.lnd_own);
-       if (np->nat_flags & NF_BEEP)
-           mpr(land.lnd_own, "\07");
        mpr(land.lnd_own, "     AARGH! %s tumbles to its doom!\n",
            prland(&land));
        land.lnd_effic = 0;
        mpr(land.lnd_own, "     AARGH! %s tumbles to its doom!\n",
            prland(&land));
        land.lnd_effic = 0;
@@ -161,9 +157,6 @@ knockdown(struct sctstr *sp)
            continue;
        if (plane.pln_ship >= 0)
            continue;
            continue;
        if (plane.pln_ship >= 0)
            continue;
-       np = getnatp(plane.pln_own);
-       if (np->nat_flags & NF_BEEP)
-           mpr(plane.pln_own, "\07");
        mpr(plane.pln_own, "     AARGH! %s tumbles to its doom!\n",
            prplane(&plane));
        plane.pln_effic = 0;
        mpr(plane.pln_own, "     AARGH! %s tumbles to its doom!\n",
            prplane(&plane));
        plane.pln_effic = 0;
@@ -176,9 +169,6 @@ knockdown(struct sctstr *sp)
            continue;
        if (nuke.nuk_plane >= 0)
            continue;
            continue;
        if (nuke.nuk_plane >= 0)
            continue;
-       np = getnatp(nuke.nuk_own);
-       if (np->nat_flags & NF_BEEP)
-           mpr(nuke.nuk_own, "\07");
        mpr(nuke.nuk_own, "     %s sinks to the bottom of the sea!\n",
            prnuke(&nuke));
        nuke.nuk_effic = 0;
        mpr(nuke.nuk_own, "     %s sinks to the bottom of the sea!\n",
            prnuke(&nuke));
        nuke.nuk_effic = 0;