fixed bug with not updating screen during request door post delay
authorHolger Schemel <info@artsoft.org>
Fri, 11 May 2018 10:32:05 +0000 (12:32 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 5 Jun 2018 18:58:42 +0000 (20:58 +0200)
src/tools.c

index 903818a414b6b5ea5ca0a23ec70640b7d57a1b22..76b40a291272a7c899ca1fba7c003f69ccfcf72b 100644 (file)
@@ -5150,11 +5150,14 @@ unsigned int MoveDoor(unsigned int door_state)
     {
       /* 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));
+       door_delay_value = MAX(door_1.post_delay, door_2.post_delay);
       else if (door_state & DOOR_ACTION_1)
-       Delay(door_1.post_delay);
+       door_delay_value = door_1.post_delay;
       else if (door_state & DOOR_ACTION_2)
-       Delay(door_2.post_delay);
+       door_delay_value = door_2.post_delay;
+
+      while (!DelayReached(&door_delay, door_delay_value))
+       BackToFront();
     }
   }