bridgefall: Fix support loss with EASY_BRIDGES and BRIDGETOWERS on

With EASY_BRIDGES on, bridge spans need to be next to land or a bridge
tower to remain standing.

Land can't go away, but a bridge tower can fall.  Bridge spans next to
it may lose support then.  Bug: they don't fall when they lose support
that way.  Fix that.

Broken in commit 40eb78e, v4.3.12.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-01-17 20:50:58 +01:00
parent d80ecb97f5
commit 292bfac797
4 changed files with 6 additions and 6 deletions

View file

@ -66,7 +66,7 @@ bridge_damaged(struct sctstr *sp)
des = sp->sct_type; des = sp->sct_type;
if (des == SCT_BSPAN || des == SCT_BTOWER) if (des == SCT_BSPAN || des == SCT_BTOWER)
knockdown(sp); knockdown(sp);
if ((des == SCT_BHEAD || des == SCT_BTOWER) && !opt_EASY_BRIDGES) if ((des == SCT_BHEAD && !opt_EASY_BRIDGES) || des == SCT_BTOWER)
bridgefall(sp); bridgefall(sp);
} }

View file

@ -9,5 +9,4 @@ fire se 2,0 0,-2
| tower stands, and supports span | tower stands, and supports span
fire se 2,0 6,0 fire se 2,0 6,0
| tower falls, span 3,-3 falls | tower falls, span 3,-3 falls
| BUG: doesn't fall
fire se 2,0 1,-3 fire se 2,0 1,-3

View file

@ -71,7 +71,7 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd
0 -4 -4 0 0 0 0 0 0 0 0 0 0 -4 -4 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 0 -4 -4 0 0 0 0 0 0 0 0 0 0 -4 -4 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 0 5 -3 0 0 0 0 0 0 0 0 0 0 5 -3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
0 7 -3 0 0 0 0 0 0 0 0 0 0 7 -3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 0 7 -3 0 0 0 0 0 0 0 0 0 0 7 -3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
0 9 -3 0 0 0 0 0 0 0 0 0 0 9 -3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0 0 9 -3 0 0 0 0 0 0 0 0 0 0 9 -3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0

View file

@ -80,7 +80,7 @@
Play#0 output Play#0 1 09876543210123456789 Play#0 output Play#0 1 09876543210123456789
Play#0 output Play#0 1 -5 . . . . . . + . . . -5 Play#0 output Play#0 1 -5 . . . . . . + . . . -5
Play#0 output Play#0 1 -4 . . . . . . = . . . -4 Play#0 output Play#0 1 -4 . . . . . . = . . . -4
Play#0 output Play#0 1 -3 . . . . . . = . . . -3 Play#0 output Play#0 1 -3 . . . . . . . . . . -3
Play#0 output Play#0 1 -2 . . . . . . = . . . -2 Play#0 output Play#0 1 -2 . . . . . . = . . . -2
Play#0 output Play#0 1 -1 . . . . . # = . . . -1 Play#0 output Play#0 1 -1 . . . . . # = . . . -1
Play#0 output Play#0 1 0 . . . . . c f . @ = 0 Play#0 output Play#0 1 0 . . . . . c f . @ = 0
@ -194,7 +194,7 @@
Play#0 output Play#0 1 09876543210123456789 Play#0 output Play#0 1 09876543210123456789
Play#0 output Play#0 1 -5 . . . . . . + . . . -5 Play#0 output Play#0 1 -5 . . . . . . + . . . -5
Play#0 output Play#0 1 -4 . . . . . . = . . . -4 Play#0 output Play#0 1 -4 . . . . . . = . . . -4
Play#0 output Play#0 1 -3 . . . . . . = . . . -3 Play#0 output Play#0 1 -3 . . . . . . . . . . -3
Play#0 output Play#0 1 -2 . . . . . . = . . . -2 Play#0 output Play#0 1 -2 . . . . . . = . . . -2
Play#0 output Play#0 1 -1 . . . . . # = . . . -1 Play#0 output Play#0 1 -1 . . . . . # = . . . -1
Play#0 output Play#0 1 0 . . . . . c f . @ = 0 Play#0 output Play#0 1 0 . . . . . c f . @ = 0
@ -212,7 +212,7 @@
Play#0 output Play#0 1 own sect eff prd mob uf uf old civ mil uw food work avail fall coa Play#0 output Play#0 1 own sect eff prd mob uf uf old civ mil uw food work avail fall coa
Play#0 output Play#0 1 2 2,-4 = 100% 0 .. .. 100 0 0 0 0% 0 0 1 Play#0 output Play#0 1 2 2,-4 = 100% 0 .. .. 100 0 0 0 0% 0 0 1
Play#0 output Play#0 1 0 1,-3 . 0% 0 .. .. 0 0 0 0 0% 0 0 1 Play#0 output Play#0 1 0 1,-3 . 0% 0 .. .. 0 0 0 0 0% 0 0 1
Play#0 output Play#0 1 2 3,-3 = 100% 0 .. .. 100 0 0 0 0% 0 0 1 Play#0 output Play#0 1 0 3,-3 . 0% 0 .. .. 0 0 0 0 0% 0 0 1
Play#0 output Play#0 1 0 0,-2 . 0% 0 .. .. 0 0 0 0 0% 0 0 1 Play#0 output Play#0 1 0 0,-2 . 0% 0 .. .. 0 0 0 0 0% 0 0 1
Play#0 output Play#0 1 2 2,-2 = 100% 0 .. .. 100 0 0 0 0% 0 0 1 Play#0 output Play#0 1 2 2,-2 = 100% 0 .. .. 100 0 0 0 0% 0 0 1
Play#0 output Play#0 1 0 -1,-1 . 0% 0 .. .. 0 0 0 0 0% 0 0 1 Play#0 output Play#0 1 0 -1,-1 . 0% 0 .. .. 0 0 0 0 0% 0 0 1
@ -249,6 +249,7 @@
Play#0 output Play#0 1 Country #1 shelled sector 6,0 for 46 damage. Play#0 output Play#0 1 Country #1 shelled sector 6,0 for 46 damage.
Play#0 output Play#0 1 Country #1 shelled sector 1,-3 for 23 damage. Play#0 output Play#0 1 Country #1 shelled sector 1,-3 for 23 damage.
Play#0 output Play#0 1 Crumble... SCREEEECH! Splash! Bridge tower falls at 1,-3! Play#0 output Play#0 1 Crumble... SCREEEECH! Splash! Bridge tower falls at 1,-3!
Play#0 output Play#0 1 Crumble... SCREEEECH! Splash! Bridge falls at 3,-3!
Play#0 output Play#0 1 Play#0 output Play#0 1
Play#0 output Play#0 1 > BULLETIN from POGO, (#0) dated Thu Jan 1 00:00:00 1970 Play#0 output Play#0 1 > BULLETIN from POGO, (#0) dated Thu Jan 1 00:00:00 1970
Play#0 output Play#0 1 Country #1 shelled sector 8,2 for 28 damage. Play#0 output Play#0 1 Country #1 shelled sector 8,2 for 28 damage.