You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The point is to override any sentence which is currently played on CHAN_VOICE on triggering other ambient_radio. This way we should ensure that two sentences don't play in parallel, and it works this way in GoldSource.
However it doesn't work as expected in Xash3D, at least when one ambient_radio plays a sentence in world, and other one plays another sentence on the player. Instead both are playing in parallel.
Here's the test map: radiotest.bsp.zip. Push two buttons to reproduce the bug.
Field Intensity mod is affected by the bug when playing on Xash3D, on the map fid1a0a. Pickup the radio right after the radioman plays its sentence and you'll hear his next sentence playing in parallel to the previous one.
The text was updated successfully, but these errors were encountered:
Turns out, it isn't a mixer error, but yet another undocumented Xash extension.
In SV_BuildSoundMsg, there is a check:
if( SV_IsValidEdict( ent ) && SV_IsValidEdict( ent->v.aiment ))
entityIndex = NUM_FOR_EDICT( ent->v.aiment );
else if( SV_IsValidEdict( ent ))
entityIndex = NUM_FOR_EDICT( ent );
else entityIndex = 0; // assume world
When an entity has an aiment set, the sound is automatically gets attached to that entity.
I think this check is kinda stupid, if a game developer explicitly passed an edict to EmitSound, then they might actually want to play sound from that entity, not from whatever was set in the aiment.
This check was added more than 10 years ago: FWGS/Xash3DArchive@8f6f3fc. Judging by changelog entry, it was made to fix the sound problem with weapons. I'm pretty sure this is an outdated check and can be safely reverted.
I have the entity that creates the entity singletone which plays a sound either in world or on player by attaching itself to the player.
The point is to override any sentence which is currently played on CHAN_VOICE on triggering other
ambient_radio
. This way we should ensure that two sentences don't play in parallel, and it works this way in GoldSource.However it doesn't work as expected in Xash3D, at least when one
ambient_radio
plays a sentence in world, and other one plays another sentence on the player. Instead both are playing in parallel.Here's the test map: radiotest.bsp.zip. Push two buttons to reproduce the bug.
Field Intensity mod is affected by the bug when playing on Xash3D, on the map fid1a0a. Pickup the radio right after the radioman plays its sentence and you'll hear his next sentence playing in parallel to the previous one.
The text was updated successfully, but these errors were encountered: