From e7576855df96ac5d288e03edbf6b1fc900eb7697 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 8 Jun 2017 08:26:10 -0400 Subject: [PATCH] One more goto gone. --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.31.1