[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.32,1.33

Gregory Montoir cyx at users.sourceforge.net
Wed Dec 3 02:34:01 CET 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv30868

Modified Files:
	command.cpp 
Log Message:
fix problem in opening/closing doors

Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- command.cpp	2 Dec 2003 19:58:31 -0000	1.32
+++ command.cpp	3 Dec 2003 10:33:14 -0000	1.33
@@ -1013,7 +1013,7 @@
 
 			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 @@
 
 			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::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) {
@@ -1132,6 +1132,8 @@
 			}
 		}
 	}
+
+	debug(0, "Command::openOrCloseAssociatedObject() - com=%X", com);
 
 	if (com != 0) {
 





More information about the Scummvm-git-logs mailing list