X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=a16135cc7926f2a03263daa105742adbf6b04fce;hp=6b817e85cf59cdbc8e012ea189b6c6c1249f8e19;hb=99bfb768ebcf81fe1026fff8492824175e4dd903;hpb=a05bc2ca1119e70c79cf0a8512f1d2ed9a97a5a7 diff --git a/src/tools.c b/src/tools.c index 6b817e85..a16135cc 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4862,9 +4862,23 @@ unsigned int MoveDoor(unsigned int door_state) { /* opening door sound has priority over simultaneously closing door */ if (door_state & (DOOR_OPEN_1 | DOOR_OPEN_2)) + { PlayMenuSoundStereo(SND_DOOR_OPENING, SOUND_MIDDLE); + + if (door_state & DOOR_OPEN_1) + PlayMenuSoundStereo(SND_DOOR_1_OPENING, SOUND_MIDDLE); + if (door_state & DOOR_OPEN_2) + PlayMenuSoundStereo(SND_DOOR_2_OPENING, SOUND_MIDDLE); + } else if (door_state & (DOOR_CLOSE_1 | DOOR_CLOSE_2)) + { PlayMenuSoundStereo(SND_DOOR_CLOSING, SOUND_MIDDLE); + + if (door_state & DOOR_CLOSE_1) + PlayMenuSoundStereo(SND_DOOR_1_CLOSING, SOUND_MIDDLE); + if (door_state & DOOR_CLOSE_2) + PlayMenuSoundStereo(SND_DOOR_2_CLOSING, SOUND_MIDDLE); + } } for (k = start; k < num_move_steps; k++)