aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
Diffstat (limited to 'saga')
-rw-r--r--saga/actor.cpp9
-rw-r--r--saga/sfuncs.cpp2
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;