* doom: fix blazing door sounds
@ 2016-06-30 18:06 qwx
0 siblings, 0 replies; only message in thread
From: qwx @ 2016-06-30 18:06 UTC (permalink / raw)
To: 9front
doom: fix blazing door sounds
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.
diff -r 0a3cf47fce65 sys/src/games/doom/p_doors.c
--- a/sys/src/games/doom/p_doors.c Mon Jun 27 00:36:54 2016 +0200
+++ b/sys/src/games/doom/p_doors.c Thu Jun 30 16:00:01 2016 +0300
@@ -115,12 +115,6 @@
{
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 @@
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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-30 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 18:06 doom: fix blazing door sounds qwx
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).