1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-14 00:54:05 +02:00

#14 fix dead enemy hit sound

This commit is contained in:
XProger
2018-02-27 03:10:59 +03:00
parent bf136a801a
commit 72fe401456

View File

@@ -240,10 +240,10 @@ struct Enemy : Character {
}
virtual void hit(float damage, Controller *enemy = NULL, TR::HitType hitType = TR::HIT_DEFAULT) {
if (hitSound > -1 && health > 0.0f)
game->playSound(hitSound, pos, Sound::PAN);
Character::hit(damage, enemy, hitType);
wound = true;
if (hitSound > -1)
game->playSound(hitSound, pos, Sound::PAN);
};
void bite(const vec3 &pos, float damage) {