Project

General

Profile

Bug #226

Sector soundorg z level is always 0

Added by jimigrey about 19 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
Start date:
2005-03-24
% Done:

100%


Description

When an elevator moves up from height 0, the sound
stays at the bottom. When an elevator goes down from
height 0, the sound stays at the top. A door is opened
at height 1024, the sound is very silent, because the
sound is at height 0.

I found a way to fix this in a dll. This works for
jDoom and jHeretic in the way it is.

Into the "void S_SectorSound(sector_t *sec, int id)" I
added this:"if(sec->soundorg.z != sec->floorheight +
((sec->ceilingheight - sec->floorheight) / 2))
sec->soundorg.z = sec->floorheight +
((sec->ceilingheight - sec->floorheight) / 2);" just
below this line:"mobj_t *origin = (mobj_t *)
&sec->soundorg;"

That way the soundorg z gets updated everytime a sound
is played in a sector, if the soundorg z is not on the
correct level.

Labels: Sound (DS8)

History

#1 Updated by danij over 18 years ago

Logged In: YES
user_id=849456

I'm not too keen on moving the ONLY sound origin in a
sector. Remember that it is used to play ALL sector based
sounds so doing so would create somewhat strange results
sometimes.

I think a better solution would be:

Engine-side:
Have three degenmobj_ts per sector, floor, ceiling and one
that is ALWAYS at the mid height between the two.

The floor/ceiling degenmobj_ts would always be moved with
their respective plane.

Game-side:
We simply select the appropriate origin for the sound when
calling S_StartSound() via DMU.

#2 Updated by skyjake over 18 years ago

Logged In: YES
user_id=717323

Sounds good to me (pun intended :-)).

#3 Updated by danij about 18 years ago

Logged In: YES
user_id=849456

I've now implemented this in CVS for 1.9.0 as agreed.

Also available in: Atom PDF