rnd-20020601-1-src
[rocksndiamonds.git] / src / tools.c
index 801eb6b5b7f9c6e432d964407afe5c30b7565ecc..9aea7b4c7fcc64e29f951c2d214a1c4b365d79bb 100644 (file)
@@ -2100,9 +2100,10 @@ unsigned int MoveDoor(unsigned int door_state)
   {
     if (!(door_state & DOOR_NO_DELAY))
     {
+      /* opening door sound has priority over simultaneously closing door */
       if (door_state & (DOOR_OPEN_1 | DOOR_OPEN_2))
        PlaySoundStereo(SND_MENU_DOOR_OPENING, SOUND_MAX_RIGHT);
-      if (door_state & (DOOR_CLOSE_1 | DOOR_CLOSE_2))
+      else if (door_state & (DOOR_CLOSE_1 | DOOR_CLOSE_2))
        PlaySoundStereo(SND_MENU_DOOR_CLOSING, SOUND_MAX_RIGHT);
     }