[Scummvm-cvs-logs] CVS: scummvm/saga sfuncs.cpp,1.125,1.126

Andrew Kurushin h00ligan at users.sourceforge.net
Thu Jun 16 08:35:16 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14313

Modified Files:
	sfuncs.cpp 
Log Message:
fix trothy -> oil lamp

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- sfuncs.cpp	15 Jun 2005 19:30:11 -0000	1.125
+++ sfuncs.cpp	16 Jun 2005 15:33:44 -0000	1.126
@@ -1479,15 +1479,24 @@
 // Param1: actor id
 // Param2: z
 void Script::sfSetActorZ(SCRIPTFUNC_PARAMS) {
-	int16 actorId;
-	int16 z;
+	int16 objectId;
 	ActorData *actor;
+	ObjectData *obj;
+	int16 z;
 
-	actorId = thread->pop();
+	objectId = thread->pop();
 	z = thread->pop();
 
-	actor = _vm->_actor->getActor(actorId);
-	actor->location.z = z;
+
+	if (_vm->_actor->validActorId(objectId)) {
+		actor = _vm->_actor->getActor(objectId);
+		actor->location.z = z;
+	} else {
+		if (_vm->_actor->validObjId(objectId)) {
+			obj = _vm->_actor->getObj(objectId);
+			obj->location.z = z;
+		}
+	}
 }
 
 // Script function #59 (0x3B)





More information about the Scummvm-git-logs mailing list