[Scummvm-cvs-logs] SF.net SVN: scummvm: [28352] scummvm/trunk/engines/saga/actor.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Jul 31 06:19:24 CEST 2007


Revision: 28352
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28352&view=rev
Author:   thebluegr
Date:     2007-07-30 21:19:23 -0700 (Mon, 30 Jul 2007)

Log Message:
-----------
Implement some differences to the actor walking code in IHNM

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.cpp

Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2007-07-31 02:07:32 UTC (rev 28351)
+++ scummvm/trunk/engines/saga/actor.cpp	2007-07-31 04:19:23 UTC (rev 28352)
@@ -2129,7 +2129,10 @@
 			if ((((actor->_currentAction >= kActionWalkToPoint) &&
 				(actor->_currentAction <= kActionWalkDir)) || (actor == _protagonist)) &&
 				!_vm->_scene->canWalk(pointFrom)) {
-				for (i = 1; i < 8; i++) {
+				
+				int max = _vm->getGameType() == GType_ITE ? 8 : 4;
+
+				for (i = 1; i < max; i++) {
 					pointAdd = pointFrom;
 					pointAdd.y += i;
 					if (_vm->_scene->canWalk(pointAdd)) {
@@ -2142,18 +2145,20 @@
 						pointFrom = pointAdd;
 						break;
 					}
-					pointAdd = pointFrom;
-					pointAdd.x += i;
-					if (_vm->_scene->canWalk(pointAdd)) {
-						pointFrom = pointAdd;
-						break;
+					if (_vm->getGameType() == GType_ITE) {
+						pointAdd = pointFrom;
+						pointAdd.x += i;
+						if (_vm->_scene->canWalk(pointAdd)) {
+							pointFrom = pointAdd;
+							break;
+						}
+						pointAdd = pointFrom;
+						pointAdd.x -= i;
+						if (_vm->_scene->canWalk(pointAdd)) {
+							pointFrom = pointAdd;
+							break;
+						}
 					}
-					pointAdd = pointFrom;
-					pointAdd.x -= i;
-					if (_vm->_scene->canWalk(pointAdd)) {
-						pointFrom = pointAdd;
-						break;
-					}
 				}
 			}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list