diff options
author | Sven Hesse | 2012-01-28 20:09:58 +0100 |
---|---|---|
committer | Sven Hesse | 2012-01-28 20:09:58 +0100 |
commit | 9fba98415de3fe4bd0549075eed9f7b42400f8c5 (patch) | |
tree | 7c5efb71ac182ea9476b1faf79dc17dbb5c060d0 /engines/gob/minigames | |
parent | c161cc123239966128d9487e84face5fbdc463de (diff) | |
download | scummvm-rg350-9fba98415de3fe4bd0549075eed9f7b42400f8c5.tar.gz scummvm-rg350-9fba98415de3fe4bd0549075eed9f7b42400f8c5.tar.bz2 scummvm-rg350-9fba98415de3fe4bd0549075eed9f7b42400f8c5.zip |
GOB: Don't play a hurt animation right before Oko dies
Diffstat (limited to 'engines/gob/minigames')
-rw-r--r-- | engines/gob/minigames/geisha/diving.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/gob/minigames/geisha/diving.cpp b/engines/gob/minigames/geisha/diving.cpp index 047eb5b5d0..12571be7ff 100644 --- a/engines/gob/minigames/geisha/diving.cpp +++ b/engines/gob/minigames/geisha/diving.cpp @@ -725,10 +725,6 @@ void Diving::checkOkoHurt() { if (_oko->getState() != Oko::kStateSwim) return; - // Oko dies if the health reaches 0 - if (_healthMeter->getValue() == 0) - _oko->die(); - // Give Oko a grace period after being hurt if (_hurtGracePeriod > 0) { _hurtGracePeriod--; @@ -740,9 +736,14 @@ void Diving::checkOkoHurt() { EvilFish &evilFish = *_evilFish[i].evilFish; if (!evilFish.isDead() && evilFish.isIn(*_oko)) { - _oko->hurt(); _healthMeter->decrease(); + // If the health reached 0, Oko dies. Otherwise, she gets hurt + if (_healthMeter->getValue() == 0) + _oko->die(); + else + _oko->hurt(); + _hurtGracePeriod = 10; break; } |