mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Revert removal of "Detail" from sound layers.
This commit is contained in:
parent
2fda94aa35
commit
76fa62d8fb
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@ class CMapSounds : public CComponent
|
|||
struct CSourceQueueEntry
|
||||
{
|
||||
int m_Sound;
|
||||
bool m_HighDetail;
|
||||
ISound::CVoiceHandle m_Voice;
|
||||
CSoundSource *m_pSource;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue