Skip to content

Commit

Permalink
Fix sounds being played even when out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Sep 15, 2018
1 parent dac612d commit e10c5aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logic/SoundController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void SoundController::onUpdate(float deltaTime)
switch (m_SoundMode)
{
case ZenLoad::SM_LOOPING:
if (!m_PlayedSound|| m_PlayedSound->state() != Audio::State::Playing && isInHearingRange())
if ((!m_PlayedSound || m_PlayedSound->state() != Audio::State::Playing) && isInHearingRange())
{
playSound(m_SoundFile);
}
Expand Down

0 comments on commit e10c5aa

Please sign in to comment.