From 765a40ac5c510680245ac9cbc1ebfef5653f5715 Mon Sep 17 00:00:00 2001 From: wraitii Date: Thu, 4 Mar 2021 17:36:24 +0000 Subject: [PATCH] Fix compilation with --without-audio Compilation --without-audio was broken since D3108 / 876f6d5e50 Patch by: nwtour Reviewed By: wraitii Differential Revision: https://code.wildfiregames.com/D3631 This was SVN commit r25009. --- source/soundmanager/scripting/SoundGroup.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/soundmanager/scripting/SoundGroup.cpp b/source/soundmanager/scripting/SoundGroup.cpp index 3a3b14f142..58f4201fd7 100644 --- a/source/soundmanager/scripting/SoundGroup.cpp +++ b/source/soundmanager/scripting/SoundGroup.cpp @@ -123,6 +123,12 @@ CSoundGroup::~CSoundGroup() float CSoundGroup::RadiansOffCenter(const CVector3D& position, bool& onScreen, float& itemRollOff) { +#if !CONFIG2_AUDIO + UNUSED2(position); + UNUSED2(onScreen); + UNUSED2(itemRollOff); + return 0.f; +#else const int screenWidth = g_Game->GetView()->GetCamera()->GetViewPort().m_Width; const int screenHeight = g_Game->GetView()->GetCamera()->GetViewPort().m_Height; const float xBufferSize = screenWidth * 0.1f; @@ -166,6 +172,7 @@ float CSoundGroup::RadiansOffCenter(const CVector3D& position, bool& onScreen, f } return answer; +#endif // !CONFIG2_AUDIO } void CSoundGroup::UploadPropertiesAndPlay(size_t index, const CVector3D& position, entity_id_t source)