1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-09 22:56:53 +02:00

#183 fix "Fire sound fx"

This commit is contained in:
XProger
2019-05-29 03:32:40 +03:00
parent 712509c047
commit f566fb4d39
2 changed files with 6 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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));