Commit 9186c005 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Simplify gravity sound playback.

parent 134a8647
......@@ -222,15 +222,13 @@ void Board::gravity(bool update)
if (!m_gravityFlag) {
return;
}
bool fallingTiles = false;
for (int i = 0; i < xTiles(); ++i) {
if (gravity(i, update)) {
fallingTiles = true;
if (Prefs::sounds()) {
m_soundFall.start();
}
}
}
if (Prefs::sounds() && fallingTiles) {
m_soundFall.start();
}
}
bool Board::gravity(int column, bool update)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment