From 76fa62d8fb3bfee20926e87680641b59b5bdd0fc Mon Sep 17 00:00:00 2001 From: furo Date: Mon, 25 Dec 2023 01:17:36 +0100 Subject: [PATCH] Revert removal of "Detail" from sound layers. --- src/game/client/components/mapsounds.cpp | 3 ++- src/game/client/components/mapsounds.h | 1 + src/game/editor/popups.cpp | 6 ------ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/game/client/components/mapsounds.cpp b/src/game/client/components/mapsounds.cpp index 9f7c0b93e..df47cb4f0 100644 --- a/src/game/client/components/mapsounds.cpp +++ b/src/game/client/components/mapsounds.cpp @@ -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()) { diff --git a/src/game/client/components/mapsounds.h b/src/game/client/components/mapsounds.h index afdd7353f..455326434 100644 --- a/src/game/client/components/mapsounds.h +++ b/src/game/client/components/mapsounds.h @@ -18,6 +18,7 @@ class CMapSounds : public CComponent struct CSourceQueueEntry { int m_Sound; + bool m_HighDetail; ISound::CVoiceHandle m_Voice; CSoundSource *m_pSource; diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index e9bcb721c..2fdd634cb 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -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(&View, aProps, s_aIds, &NewVal);