From: Holger Schemel Date: Fri, 28 Dec 2018 15:11:19 +0000 (+0100) Subject: fixed not closing doors simultaneously after solving a level X-Git-Tag: 4.1.2.0~69 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7732b3bda99e3cafc7db8718f2cac1f507c978e8;p=rocksndiamonds.git fixed not closing doors simultaneously after solving a level --- diff --git a/src/files.c b/src/files.c index 01394c4e..cd411a09 100644 --- a/src/files.c +++ b/src/files.c @@ -8171,18 +8171,19 @@ void SaveTape(int nr) tape.changed = FALSE; } -static boolean SaveTapeCheckedExt(int nr, char *msg_replace, char *msg_saved) +static boolean SaveTapeCheckedExt(int nr, char *msg_replace, char *msg_saved, + unsigned int req_state_added) { char *filename = getTapeFilename(nr); boolean new_tape = !fileExists(filename); boolean tape_saved = FALSE; - if (new_tape || Request(msg_replace, REQ_ASK)) + if (new_tape || Request(msg_replace, REQ_ASK | req_state_added)) { SaveTape(nr); if (new_tape) - Request(msg_saved, REQ_CONFIRM); + Request(msg_saved, REQ_CONFIRM | req_state_added); tape_saved = TRUE; } @@ -8192,13 +8193,13 @@ static boolean SaveTapeCheckedExt(int nr, char *msg_replace, char *msg_saved) boolean SaveTapeChecked(int nr) { - return SaveTapeCheckedExt(nr, "Replace old tape?", "Tape saved!"); + return SaveTapeCheckedExt(nr, "Replace old tape?", "Tape saved!", 0); } boolean SaveTapeChecked_LevelSolved(int nr) { return SaveTapeCheckedExt(nr, "Level solved! Replace old tape?", - "Level solved! Tape saved!"); + "Level solved! Tape saved!", REQ_STAY_OPEN); } void DumpTape(struct TapeInfo *tape)