From f566fb4d392d6ec086d59a0bbcfafd21e6fd929e Mon Sep 17 00:00:00 2001 From: XProger Date: Wed, 29 May 2019 03:32:40 +0300 Subject: [PATCH] #183 fix "Fire sound fx" --- src/lara.h | 3 ++- src/objects.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lara.h b/src/lara.h index 40a677c..0cafb7f 100644 --- a/src/lara.h +++ b/src/lara.h @@ -1674,7 +1674,8 @@ struct Lara : Character { } if (hitType == TR::HIT_LAVA) { - for (int i = 0; i < 10; i++) + Flame::add(game, this, 0); + for (int i = 1; i < 10; i++) Flame::add(game, this, rand() % getModel()->mCount); } diff --git a/src/objects.h b/src/objects.h index c5b25d3..7b97df0 100644 --- a/src/objects.h +++ b/src/objects.h @@ -166,7 +166,10 @@ struct Flame : Sprite { virtual void update() { Sprite::update(); - game->playSound(TR::SND_FLAME, pos, Sound::PAN); + + if (jointIndex <= 0) { + game->playSound(TR::SND_FLAME, pos, Sound::PAN); + } Character *lara = (Character*)((owner && owner->getEntity().isLara()) ? owner : game->getLara(pos));