summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-06-30 17:13:47 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-06-30 17:13:47 +0200
commitca8ca008f4ab7074971a35e08de9a46cb9b5d5ab (patch)
tree361c8fae5f2748308be658cab2b4c7ef9d894710
parentdab539cd14726de15932b0310532212f8da29bf7 (diff)
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.
-rw-r--r--sys/src/games/doom/p_doors.c14
1 files 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,