Skip to content

Commit

Permalink
fix fast doors reopening with wrong sound (#2139)
Browse files Browse the repository at this point in the history
* fix fast doors reopening with wrong sound

Thanks @MrAlaux for pointing me to this fix.

* change comp flag description accordingly
  • Loading branch information
fabiangreffrath authored Jan 12, 2025
1 parent d915c18 commit ffa9a39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -4780,7 +4780,7 @@ void G_BindCompVariables(void)
BIND_COMP(comp_vile, 0, "Arch-viles can create ghost monsters");
BIND_COMP(comp_pain, 0, "Pain elementals are limited to 20 lost souls");
BIND_COMP(comp_skull, 0, "Lost souls can spawn past impassable lines");
BIND_COMP(comp_blazing, 0, "Blazing doors make double closing sounds");
BIND_COMP(comp_blazing, 0, "Incorrect sound behavior for blazing doors");
BIND_COMP(comp_doorlight, 0, "Door lighting changes are immediate");
BIND_COMP(comp_god, 0, "God mode isn't absolute");
BIND_COMP(comp_skymap, 0, "Don't apply invulnerability palette to skies");
Expand Down
10 changes: 10 additions & 0 deletions src/p_doors.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ void T_VerticalDoor (vldoor_t *door)
case doorClose: // Close types do not bounce, merely wait
break;

case blazeRaise:
case genBlazeRaise:
door->direction = 1;
if (!STRICTMODE_COMP(comp_blazing))
{
S_StartSound((mobj_t *)&door->sector->soundorg,sfx_bdopn);
break;
}
// fallthrough

default: // other types bounce off the obstruction
door->direction = 1;
S_StartSound((mobj_t *)&door->sector->soundorg,sfx_doropn);
Expand Down

0 comments on commit ffa9a39

Please sign in to comment.