mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fixed timer countdown sound playback
This commit is contained in:
@@ -104,13 +104,14 @@ void TurnTimerWidget::show(Canvas & to)
|
||||
|
||||
void TurnTimerWidget::updateNotifications(PlayerColor player, int timeMs)
|
||||
{
|
||||
if(player != LOCPLINT->playerID)
|
||||
return;
|
||||
|
||||
int newTimeSeconds = timeMs / 1000;
|
||||
if(player == LOCPLINT->playerID
|
||||
&& newTimeSeconds != lastSoundCheckSeconds
|
||||
&& notificationThresholds.count(newTimeSeconds))
|
||||
{
|
||||
|
||||
if (newTimeSeconds != lastSoundCheckSeconds && notificationThresholds.count(newTimeSeconds))
|
||||
CCS->soundh->playSound(AudioPath::builtin("WE5"));
|
||||
}
|
||||
|
||||
lastSoundCheckSeconds = newTimeSeconds;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user