X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=b87d7201018950e61db340d14f24b0838e83a7fb;hp=a16135cc7926f2a03263daa105742adbf6b04fce;hb=c80e8f65b8f026f8b06673f06cea31cc2667351f;hpb=99bfb768ebcf81fe1026fff8492824175e4dd903 diff --git a/src/tools.c b/src/tools.c index a16135cc..b87d7201 100644 --- a/src/tools.c +++ b/src/tools.c @@ -5055,6 +5055,17 @@ unsigned int MoveDoor(unsigned int door_state) if (door_part_done_all) break; } + + if (!(door_state & DOOR_NO_DELAY)) + { + /* wait for specified door action post delay */ + if (door_state & DOOR_ACTION_1 && door_state & DOOR_ACTION_2) + Delay(MAX(door_1.post_delay, door_2.post_delay)); + else if (door_state & DOOR_ACTION_1) + Delay(door_1.post_delay); + else if (door_state & DOOR_ACTION_2) + Delay(door_2.post_delay); + } } if (door_state & DOOR_ACTION_1)