1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fix possible memory leaks in sound handler, simplify API

This commit is contained in:
Ivan Savenko
2025-04-27 17:06:08 +03:00
parent 5433b07e5f
commit e567e1b820
5 changed files with 91 additions and 61 deletions

View File

@@ -357,7 +357,7 @@ bool MovementAnimation::init()
if (moveSoundHandler == -1)
{
moveSoundHandler = ENGINE->sound().playSound(stack->unitType()->sounds.move, -1);
moveSoundHandler = ENGINE->sound().playSoundLooped(stack->unitType()->sounds.move);
}
Point begPosition = owner.stacksController->getStackPositionAtHex(prevHex, stack);