From: Eric S. Raymond Date: Thu, 8 Jun 2017 12:26:10 +0000 (-0400) Subject: One more goto gone. X-Git-Tag: 1.1~503 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=e7576855df96ac5d288e03edbf6b1fc900eb7697;p=open-adventure.git One more goto gone. --- diff --git a/main.c b/main.c index b5979e6..944a14d 100644 --- a/main.c +++ b/main.c @@ -346,11 +346,15 @@ static bool dwarfmove(void) if(HERE(J)) K=1; } + /* Force chest placement before player finds last treasure */ if(game.tally == 1 && K == 0 && game.place[CHEST] == 0 && HERE(LAMP) && game.prop[LAMP] == 1) { RSPEAK(186); MOVE(CHEST,game.chloc); MOVE(MESSAG,game.chloc2); - goto L6024; + game.dloc[PIRATE]=game.chloc; + game.odloc[PIRATE]=game.chloc; + game.dseen[PIRATE]=false; + continue; } if(game.odloc[PIRATE] != game.dloc[PIRATE] && PCT(20)) RSPEAK(127); @@ -372,7 +376,6 @@ static bool dwarfmove(void) DROP(J,game.chloc); } } - L6024: game.dloc[PIRATE]=game.chloc; game.odloc[PIRATE]=game.chloc; game.dseen[PIRATE]=false;