From 44d433d941575da0a16d3ad9c905ba71ec20d19c Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 13 Mar 2019 22:05:24 +0100 Subject: [PATCH] sfx glitch --- src/aosfxplayer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aosfxplayer.cpp b/src/aosfxplayer.cpp index 9f47e01..710d7a8 100644 --- a/src/aosfxplayer.cpp +++ b/src/aosfxplayer.cpp @@ -79,11 +79,14 @@ void AOSfxPlayer::play(QString p_sfx, QString p_char, QString shout) else f_path = sound_path; + if (file_exists(f_path)) //if its missing, it will glitch out + { m_sfx.setSource(QUrl::fromLocalFile(f_path)); set_volume(m_volume); m_sfx.play(); + } } void AOSfxPlayer::stop()