aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorDavid Eriksson2003-10-14 06:41:08 +0000
committerDavid Eriksson2003-10-14 06:41:08 +0000
commit18ebc6e92efe8ec2c0d6334f24d6b3821c9f4bdf (patch)
tree759e2398f368243f6c2b52c158c35957ec37e711 /queen
parent15eb5a91b0386f82816329f5808bc8b7500fec33 (diff)
downloadscummvm-rg350-18ebc6e92efe8ec2c0d6334f24d6b3821c9f4bdf.tar.gz
scummvm-rg350-18ebc6e92efe8ec2c0d6334f24d6b3821c9f4bdf.tar.bz2
scummvm-rg350-18ebc6e92efe8ec2c0d6334f24d6b3821c9f4bdf.zip
Compare correct actor names.
svn-id: r10787
Diffstat (limited to 'queen')
-rw-r--r--queen/logic.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp
index 7e69d44848..588f826cf1 100644
--- a/queen/logic.cpp
+++ b/queen/logic.cpp
@@ -1138,12 +1138,12 @@ void Logic::personSetData(int16 noun, const char *actorName, bool loadBank, Pers
}
// search for a matching actor
- uint16 actor = 1;
+ uint16 actor = 0;
for (i = 1; i <= _numActors; ++i) {
ActorData *pad = &_actorData[i];
if (pad->room == _currentRoom) {
if (_gameState[pad->gameStateSlot] == pad->gameStateValue) {
- if ((bobNum > 0 && bobNum == pad->bobNum) || strcmp(pp->name, actorName) == 0) {
+ if ((bobNum > 0 && bobNum == pad->bobNum) || strcmp(_aName[pad->name], actorName) == 0) {
actor = i;
break;
}
@@ -1151,6 +1151,9 @@ void Logic::personSetData(int16 noun, const char *actorName, bool loadBank, Pers
}
}
+ if (!actor)
+ error ("Actor '%s' not found", actorName);
+
pp->actor = &_actorData[actor];
pp->bankNum = pp->actor->bankNum;
pp->name = _aName[pp->actor->name];