rnd-20020803-1-src
[rocksndiamonds.git] / src / tools.c
index 801eb6b5b7f9c6e432d964407afe5c30b7565ecc..e5055eda6513d061b8f6eaab76c1922a3f4f6158 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-* (c) 1995-2001 Artsoft Entertainment                      *
+* (c) 1995-2002 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
@@ -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);
     }