From: Markus Armbruster Date: Sun, 6 Jun 2010 20:26:02 +0000 (+0200) Subject: Don't beep when plane, land unit or nuke die on collapsing bridge X-Git-Tag: v4.3.27~227 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=aa3c5ef350cf52d42b14f42baf5e419053617b4b Don't beep when plane, land unit or nuke die on collapsing bridge 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. --- diff --git a/src/lib/subs/bridgefall.c b/src/lib/subs/bridgefall.c index 664ba66f9..068039ebd 100644 --- a/src/lib/subs/bridgefall.c +++ b/src/lib/subs/bridgefall.c @@ -122,7 +122,6 @@ knockdown(struct sctstr *sp) 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", @@ -144,9 +143,6 @@ knockdown(struct sctstr *sp) 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; @@ -161,9 +157,6 @@ knockdown(struct sctstr *sp) 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; @@ -176,9 +169,6 @@ knockdown(struct sctstr *sp) 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;