Cleared up some fields (#41)

* Cleared up some fields

Renamed some fields
Made some statements involving those fields make more sense for their type
Renamed the parameters of SoundEngine::PlayAt to have more readable names

* Renamed master volume field

m_flMasterVolume -> m_fMasterVolume

* Made m_iPerspective -> m_bThirdPerson
This commit is contained in:
Vruk
2023-08-09 05:29:46 -07:00
committed by GitHub
parent 7ebf2be8a9
commit 34e0f95a8a
8 changed files with 47 additions and 51 deletions

View File

@@ -60,7 +60,7 @@ void SoundEngine::init(Options* options)
void SoundEngine::play(const std::string& name)
{
if (m_pOptions->field_4 == 0.0f)
if (m_pOptions->m_fMasterVolume == 0.0f)
return;
SoundDesc sd;
@@ -70,14 +70,14 @@ void SoundEngine::play(const std::string& name)
}
}
void SoundEngine::play(const std::string& name, float a, float b, float c, float d, float e)
void SoundEngine::play(const std::string& name, float x, float y, float z, float volume, float pitch)
{
if (m_pOptions->field_4 == 0.0f || d <= 0.0f)
if (m_pOptions->m_fMasterVolume == 0.0f || volume <= 0.0f)
return;
SoundDesc sd;
if (m_repository.get(name, sd)) {
m_soundSystem.playAt(sd, a, b, c, d, e);
m_soundSystem.playAt(sd, x, y, z, volume, pitch);
}
}