From ca8ca008f4ab7074971a35e08de9a46cb9b5d5ab Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 30 Jun 2016 17:13:47 +0200 Subject: [PATCH] doom: fix blazing door sounds (from qu7uux) blazing doors are a "fast" door type with its own sound effects, introduced in doom2. doom2 map 2 has one right at the beginning. this fixes two bugs: - when a closing blazing door is completely shut, the closing sound effect is erroneously played again (the first time being when it began closing). this gives the impression of two doors closing. - when reopening a closing blazing door (standing underneath a blazing door while it's closing), the sound effect for regular doors opening is played, instead of the one for blazing doors, because of a missing case in the switch statement. --- sys/src/games/doom/p_doors.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/src/games/doom/p_doors.c b/sys/src/games/doom/p_doors.c index 8be733276..db4854479 100644 --- a/sys/src/games/doom/p_doors.c +++ b/sys/src/games/doom/p_doors.c @@ -115,12 +115,6 @@ void T_VerticalDoor (void *_door, void*) { case BlazeRaise: case BlazeClose: - door->sector->specialdata = NULL; - P_RemoveThinker (&door->thinker); // unlink and free - S_StartSound((mobj_t *)&door->sector->soundorg, - sfx_bdcls); - break; - case Normal: case Close: door->sector->specialdata = NULL; @@ -143,7 +137,13 @@ void T_VerticalDoor (void *_door, void*) case BlazeClose: case Close: // DO NOT GO BACK UP! break; - + + case BlazeRaise: + door->direction = 1; + S_StartSound((mobj_t *)&door->sector->soundorg, + sfx_bdopn); + break; + default: door->direction = 1; S_StartSound((mobj_t *)&door->sector->soundorg,