Use vertical sound position with full_sounds (#1144)

3D sound requires `source->info->actualheight` to calculate vertical position.
This commit is contained in:
ceski 2023-07-11 12:46:23 -07:00 committed by GitHub
parent 8cc12f6680
commit e0601f00fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}