Revert removal of "Detail" from sound layers.

This commit is contained in:
furo 2023-12-25 01:17:36 +01:00
parent 2fda94aa35
commit 76fa62d8fb
3 changed files with 3 additions and 7 deletions

View file

@ -98,6 +98,7 @@ void CMapSounds::OnMapLoad()
CSourceQueueEntry Source;
Source.m_Sound = pSoundLayer->m_Sound;
Source.m_pSource = &pSources[i];
Source.m_HighDetail = pLayer->m_Flags & LAYERFLAG_DETAIL;
if(!Source.m_pSource || Source.m_Sound < 0 || Source.m_Sound >= m_Count)
continue;
@ -127,7 +128,7 @@ void CMapSounds::OnRender()
Client()->IntraGameTick(g_Config.m_ClDummy));
}
float Offset = s_Time - Source.m_pSource->m_TimeDelay;
if(!DemoPlayerPaused && Offset >= 0.0f && g_Config.m_SndEnable)
if(!DemoPlayerPaused && Offset >= 0.0f && g_Config.m_SndEnable && (g_Config.m_GfxHighDetail || !Source.m_HighDetail))
{
if(Source.m_Voice.IsValid())
{

View file

@ -18,6 +18,7 @@ class CMapSounds : public CComponent
struct CSourceQueueEntry
{
int m_Sound;
bool m_HighDetail;
ISound::CVoiceHandle m_Voice;
CSoundSource *m_pSource;

View file

@ -768,12 +768,6 @@ CUI::EPopupMenuFunctionResult CEditor::PopupLayer(void *pContext, CUIRect View,
aProps[2].m_Type = PROPTYPE_NULL;
}
// don't use Detail from the selection if this is a sound layer
if(pCurrentLayer->m_Type == LAYERTYPE_SOUNDS)
{
aProps[2].m_Type = PROPTYPE_NULL;
}
static int s_aIds[(int)ELayerProp::NUM_PROPS] = {0};
int NewVal = 0;
auto [State, Prop] = pEditor->DoPropertiesWithState<ELayerProp>(&View, aProps, s_aIds, &NewVal);