forked from mirrors/0ad
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user