From e0601f00fd1bcc8bc13b0234b510e58cf83cc5b7 Mon Sep 17 00:00:00 2001 From: ceski <56656010+ceski-1@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:46:23 -0700 Subject: [PATCH] Use vertical sound position with `full_sounds` (#1144) 3D sound requires `source->info->actualheight` to calculate vertical position. --- src/s_sound.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index fa4c03ea..9ae6d778 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -49,7 +49,7 @@ typedef struct channel_s // the set of channels available static channel_t channels[MAX_CHANNELS]; // [FG] removed map objects may finish their sounds -static degenmobj_t sobjs[MAX_CHANNELS]; +static mobj_t sobjs[MAX_CHANNELS]; // These are not used, but should be (menu). // Maximum volume of a sound effect. @@ -332,11 +332,12 @@ void S_UnlinkSound(mobj_t *origin) { if (channels[cnum].sfxinfo && channels[cnum].origin == origin) { - degenmobj_t *const sobj = &sobjs[cnum]; + mobj_t *const sobj = &sobjs[cnum]; sobj->x = origin->x; sobj->y = origin->y; sobj->z = origin->z; - channels[cnum].origin = (mobj_t *) sobj; + sobj->info = origin->info; + channels[cnum].origin = sobj; break; } }