Changeset View
Changeset View
Standalone View
Standalone View
source/soundmanager/scripting/SoundGroup.cpp
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
Lint: Inaccurate Copyright Year: Inaccurate Copyright Year | |||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | #else | ||||
if (m_SoundGroups.size() <= index) | if (m_SoundGroups.size() <= index) | ||||
return; | return; | ||||
CSoundData* sndData = m_SoundGroups[index]; | CSoundData* sndData = m_SoundGroups[index]; | ||||
if (!sndData) | if (!sndData) | ||||
return; | return; | ||||
ISoundItem* hSound = static_cast<CSoundManager*>(g_SoundManager)->ItemForEntity(source, sndData); | ISoundItem* hSound = g_SoundManager->ItemForEntity(source, sndData); | ||||
if (!hSound) | if (!hSound) | ||||
return; | return; | ||||
if (!TestFlag(eOmnipresent)) | if (!TestFlag(eOmnipresent)) | ||||
{ | { | ||||
CVector3D origin = g_Game->GetView()->GetCamera()->GetOrientation().GetTranslation(); | CVector3D origin = g_Game->GetView()->GetCamera()->GetOrientation().GetTranslation(); | ||||
float itemDist = (position - origin).Length(); | float itemDist = (position - origin).Length(); | ||||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Inaccurate Copyright Year