diff options
author | Gregory Montoir | 2003-12-03 10:33:14 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-12-03 10:33:14 +0000 |
commit | 07ba3cfabcb1f1496845b0b962d6b016c2dab179 (patch) | |
tree | 7e5647f48af0fa325534f20b7601c855e8516dc1 /queen/command.cpp | |
parent | 402b700a133b151ec88b343134947aaad0ed81e1 (diff) | |
download | scummvm-rg350-07ba3cfabcb1f1496845b0b962d6b016c2dab179.tar.gz scummvm-rg350-07ba3cfabcb1f1496845b0b962d6b016c2dab179.tar.bz2 scummvm-rg350-07ba3cfabcb1f1496845b0b962d6b016c2dab179.zip |
fix problem in opening/closing doors
svn-id: r11485
Diffstat (limited to 'queen/command.cpp')
-rw-r--r-- | queen/command.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/queen/command.cpp b/queen/command.cpp index e0527e3887..7ce4734a9f 100644 --- a/queen/command.cpp +++ b/queen/command.cpp @@ -1013,7 +1013,7 @@ void Command::changeObjectState(const Verb& action, int16 obj, int16 song, bool if (objData->entryObj != 0) { // if it's a door, then update door that it links to - openOrCloseAssociatedObject(action, objData->entryObj); + openOrCloseAssociatedObject(action, ABS(objData->entryObj)); objData->entryObj = ABS(objData->entryObj); } } @@ -1035,7 +1035,7 @@ void Command::changeObjectState(const Verb& action, int16 obj, int16 song, bool if (objData->entryObj != 0) { // if it's a door, then update door that it links to - openOrCloseAssociatedObject(action, objData->entryObj); + openOrCloseAssociatedObject(action, ABS(objData->entryObj)); objData->entryObj = -ABS(objData->entryObj); } } @@ -1107,13 +1107,13 @@ void Command::alterDefault(const Verb& def, bool itemType) { void Command::openOrCloseAssociatedObject(const Verb& action, int16 otherObj) { - warning("using Command::openOrCloseAssociatedObject()"); CmdListData *cmdList = &_cmdList[1]; uint16 com = 0; uint16 i; - for (i = 1; i <= _numCmdList && com != 0; ++i, ++cmdList) { + for (i = 1; i <= _numCmdList; ++i, ++cmdList) { if (cmdList->match(action, otherObj, 0)) { if (cmdList->setConditions) { + warning("using Command::openOrCloseAssociatedObject() with setConditions"); CmdGameState *cmdGs = _cmdGameState; uint16 j; for (j = 1; j <= _numCmdGameState; ++j) { @@ -1133,6 +1133,8 @@ void Command::openOrCloseAssociatedObject(const Verb& action, int16 otherObj) { } } + debug(0, "Command::openOrCloseAssociatedObject() - com=%X", com); + if (com != 0) { cmdList = &_cmdList[com]; |