[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.336,1.337

kirben kirben at users.sourceforge.net
Fri Apr 1 06:47:35 CEST 2005


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

Modified Files:
	actor.cpp 
Log Message:

Actor order needs to be checked too (For HE games)


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -d -r1.336 -r1.337
--- actor.cpp	30 Mar 2005 17:37:35 -0000	1.336
+++ actor.cpp	1 Apr 2005 14:46:58 -0000	1.337
@@ -1215,18 +1215,20 @@
 }
 
 int ScummEngine::getActorFromPos(int x, int y) {
-	int i;
+	int i, result;
+	result = 0;
 
 	if (!testGfxAnyUsageBits(x / 8))
 		return 0;
 	for (i = 1; i < _numActors; i++) {
 		if (testGfxUsageBit(x / 8, i) && !getClass(i, kObjectClassUntouchable)
-			&& y >= _actors[i]._top && y <= _actors[i]._bottom) {
-			if (_version > 2 || i != VAR(VAR_EGO))
-				return i;
+			&& y >= _actors[i]._top && y <= _actors[i]._bottom && _actors[i]._pos.y > _actors[result]._pos.y) {
+			if (_version > 2 || i != VAR(VAR_EGO)) {
+				result = i;
+			}
 		}
 	}
-	return 0;
+	return result;
 }
 
 void ScummEngine::actorTalk(const byte *msg) {





More information about the Scummvm-git-logs mailing list