projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code cleanup
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 903818a414b6b5ea5ca0a23ec70640b7d57a1b22..76b40a291272a7c899ca1fba7c003f69ccfcf72b 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-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)
{
/* 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)
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)
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();
}
}
}
}