]> git.pond.sub.org Git - empserver/commitdiff
bridgefall: Fix support loss with EASY_BRIDGES and BRIDGETOWERS on
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 17 Jan 2014 19:50:58 +0000 (20:50 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Feb 2014 11:00:18 +0000 (12:00 +0100)
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>
src/lib/subs/bridgefall.c
tests/bridgefall/easy-on/01-1
tests/bridgefall/final.xdump
tests/bridgefall/journal.log

index 2a283304736bd8e3b5f31c5d8005e48107840956..b1174a147c035b7b96f96a52b8d9d32328ca8456 100644 (file)
@@ -66,7 +66,7 @@ bridge_damaged(struct sctstr *sp)
     des = sp->sct_type;
     if (des == SCT_BSPAN || des == SCT_BTOWER)
        knockdown(sp);
-    if ((des == SCT_BHEAD || des == SCT_BTOWER) && !opt_EASY_BRIDGES)
+    if ((des == SCT_BHEAD && !opt_EASY_BRIDGES) || des == SCT_BTOWER)
        bridgefall(sp);
 }
 
index 1c446b06792bbd7191f12746824a21c529292ce0..674768c740d6a26ba47a4c89ccdad426140bc49a 100644 (file)
@@ -9,5 +9,4 @@ fire se 2,0 0,-2
 | tower stands, and supports span
 fire se 2,0 6,0
 | tower falls, span 3,-3 falls
-| BUG: doesn't fall
 fire se 2,0 1,-3
index 3ca863f2a5607c9aabd24c37c31d435500554b92..b6e3f09d97cef15b44b80103bce944da2f6abecf 100644 (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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 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
index ba62fdb822ff30e402b486e65a6daf563befa4ec..3c2023ef01e68ba5020e20e34d01cbfa200b3671 100644 (file)
@@ -80,7 +80,7 @@
     Play#0 output Play#0 1      09876543210123456789
     Play#0 output Play#0 1   -5  . . . . . . + . . . -5
     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   -1  . . . . . # = . . . -1
     Play#0 output Play#0 1    0 . . . . . c f . @ =  0
     Play#0 output Play#0 1      09876543210123456789
     Play#0 output Play#0 1   -5  . . . . . . + . . . -5
     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   -1  . . . . . # = . . . -1
     Play#0 output Play#0 1    0 . . . . . c f . @ =  0
     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   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   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 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 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 > 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.