From: Holger Schemel Date: Mon, 6 Jan 2025 19:39:45 +0000 (+0100) Subject: added flag for open request door after request (not used yet) X-Git-Tag: 4.4.0.1~30 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a24f5b692a4990c48b3f50dcb4b6a8c9b699cdb4;p=rocksndiamonds.git added flag for open request door after request (not used yet) --- diff --git a/src/game.c b/src/game.c index dd3106ca..8ff8c692 100644 --- a/src/game.c +++ b/src/game.c @@ -4755,6 +4755,7 @@ void InitGame(void) } game.restart_level = FALSE; + game.request_open = FALSE; game.request_active = FALSE; game.envelope_active = FALSE; game.any_door_active = FALSE; diff --git a/src/game.h b/src/game.h index d4818478..713eb8c9 100644 --- a/src/game.h +++ b/src/game.h @@ -257,6 +257,7 @@ struct GameInfo boolean restart_level; // values for special request dialog control + boolean request_open; boolean request_active; boolean envelope_active; boolean any_door_active; diff --git a/src/tools.c b/src/tools.c index 9f143726..1053e807 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5058,6 +5058,12 @@ static int RequestDoor(char *text, unsigned int req_state) if (((old_door_state & DOOR_OPEN_1) && !(req_state & REQ_STAY_CLOSED)) || (req_state & REQ_REOPEN)) OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK); + + game.request_open = FALSE; + } + else + { + game.request_open = TRUE; } return result; @@ -5339,6 +5345,9 @@ unsigned int CloseDoor(unsigned int door_state) door_state &= ~DOOR_NO_COPY_BACK; } + if (door_state & DOOR_CLOSE_1) + game.request_open = FALSE; + return MoveDoor(door_state); }