From ffb65a9e042eee2a6c51988a237a36bee29e0497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20G=C3=B6ffringmann?= Date: Mon, 14 Jul 2003 10:05:32 +0000 Subject: [PATCH] fix bug #770784: Talking characters stay at last frame svn-id: r9010 --- sky/logic.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sky/logic.cpp b/sky/logic.cpp index 33aa45f7d83..eddb74c4490 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -521,18 +521,15 @@ void SkyLogic::talk() { uint16 *graphixProg = _compact->grafixProg; // no anim file? if (graphixProg) { - if (*graphixProg) { + if ((*graphixProg) && ((_compact->extCompact->spTime != 3) || (!_skySound->speechFinished()))) { // we will force the animation to finish 3 game cycles // before the speech actually finishes - because it looks good. - if ((_compact->extCompact->spTime != 3) || (!_skySound->speechFinished())) { - _compact->frame = *(graphixProg + 2) + _compact->offset; - graphixProg += 3; - _compact->grafixProg = graphixProg; - } + _compact->frame = *(graphixProg + 2) + _compact->offset; + graphixProg += 3; + _compact->grafixProg = graphixProg; } else { - // we ran out of frames, let actor stand still. - // TODO: we should improve this and simply restart animation. + // we ran out of frames or finished speech, let actor stand still. _compact->frame = _compact->getToFlag; _compact->grafixProg = 0; }