1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Music: remember playback position of music tracks

Town & terrain themes will now resume from previously stopped position
instead of playing from start, as it was in original game.
Fixes #965
This commit is contained in:
Ivan Savenko
2022-11-13 14:05:51 +02:00
parent c5cf0e4086
commit 4af9bc2461
9 changed files with 59 additions and 32 deletions

View File

@ -276,7 +276,7 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details, bool verbose)
{
updateAmbientSounds();
//We may need to change music - select new track, music handler will change it if needed
CCS->musich->playMusicFromSet("terrain", LOCPLINT->cb->getTile(hero->visitablePos())->terType->name, true);
CCS->musich->playMusicFromSet("terrain", LOCPLINT->cb->getTile(hero->visitablePos())->terType->name, true, false);
if(details.result == TryMoveHero::TELEPORTATION)
{