diff options
author | Andrew Kurushin | 2004-12-24 14:21:47 +0000 |
---|---|---|
committer | Andrew Kurushin | 2004-12-24 14:21:47 +0000 |
commit | c8d8972dd0b6134aebd40d210c5f1c31d8435c00 (patch) | |
tree | 4813fd253a74361c77b7d5d1909f3a3450aa41b4 | |
parent | 841962dcb92d1c7c315b71b978bd52774543fc6f (diff) | |
download | scummvm-rg350-c8d8972dd0b6134aebd40d210c5f1c31d8435c00.tar.gz scummvm-rg350-c8d8972dd0b6134aebd40d210c5f1c31d8435c00.tar.bz2 scummvm-rg350-c8d8972dd0b6134aebd40d210c5f1c31d8435c00.zip |
- resolved protagonist swapping problem
svn-id: r16296
-rw-r--r-- | saga/actor.cpp | 9 | ||||
-rw-r--r-- | saga/sfuncs.cpp | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index d48566b243..f46251bec7 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -197,6 +197,13 @@ ActorData *Actor::getActor(uint16 actorId) { if (!IS_VALID_ACTOR_ID(actorId)) error("Actor::getActor Wrong actorId 0x%X", actorId); + if (actorId == ID_PROTAG) { + if (_protagonist == NULL) { + error("_protagonist == NULL"); + } + return _protagonist; + } + actor = &_actors[ACTOR_ID_TO_INDEX(actorId)]; if (actor->disabled) @@ -316,6 +323,7 @@ void Actor::handleSpeech(int msec) { } else { removeFirst = true; } + _activeSpeech.playing = false; } if (removeFirst) { @@ -323,7 +331,6 @@ void Actor::handleSpeech(int msec) { _activeSpeech.strings[i - 1] = _activeSpeech.strings[i]; } _activeSpeech.stringsCount--; - _activeSpeech.playing = false; } if (!isSpeaking()) diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index c636a6ce0f..f62d589967 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -759,7 +759,7 @@ int Script::sfSetFrame(SCRIPTFUNC_PARAMS) { if (frameRange->frameCount <= frameOffset) { // frameRange = _vm->_actor->getActorFrameRange(actorId, frameType); - warning("Wrong frameOffset 0x%X", frameOffset); + error("Wrong frameOffset 0x%X", frameOffset); } actor->frameNumber = frameRange->frameIndex + frameOffset; |