[Scummvm-cvs-logs] SF.net SVN: scummvm:[39066] scummvm/trunk/engines/cruise

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Mon Mar 2 10:14:36 CET 2009


Revision: 39066
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39066&view=rev
Author:   dreammaster
Date:     2009-03-02 09:14:36 +0000 (Mon, 02 Mar 2009)

Log Message:
-----------
Bugfix for frequent freezes when doing actions - the main movement state switch statement was actually relying on falling through case statements to work properly

Modified Paths:
--------------
    scummvm/trunk/engines/cruise/actor.cpp
    scummvm/trunk/engines/cruise/actor.h

Modified: scummvm/trunk/engines/cruise/actor.cpp
===================================================================
--- scummvm/trunk/engines/cruise/actor.cpp	2009-03-02 08:44:30 UTC (rev 39065)
+++ scummvm/trunk/engines/cruise/actor.cpp	2009-03-02 09:14:36 UTC (rev 39066)
@@ -40,7 +40,7 @@
 	while (pCurrentEntry) {
 		if ((pCurrentEntry->overlayNumber == overlayIdx || overlayIdx == -1) &&
 		        (pCurrentEntry->idx == idx || idx == -1) &&
-		        (pCurrentEntry->type == objType || objType == ANIM_WAIT)) {
+		        (pCurrentEntry->type == objType || objType == -1)) {
 			if (pCurrentEntry->pathId != ANIM_FINISH) {
 				return false;
 			}
@@ -730,10 +730,11 @@
 	while (currentActor) {
 		nextActor = currentActor->next;
 
-		if (!currentActor->freeze && ((currentActor->type == 0)	|| (currentActor->type == 1))) {
+		if (!currentActor->freeze && ((currentActor->type == ATP_MOUSE) || (currentActor->type == 1))) {
 			getMultipleObjectParam(currentActor->overlayNumber, currentActor->idx, &params);
 
-			if (((animationStart && !currentActor->flag) || (!animationStart && currentActor->x_dest != -1 && currentActor->y_dest != -1)) && (currentActor->type == 0)) {
+			if (((animationStart && !currentActor->flag) || (!animationStart && currentActor->x_dest != -1
+					&& currentActor->y_dest != -1)) && (currentActor->type == ATP_MOUSE)) {
 				// mouse animation
 				if (!animationStart) {
 					aniX = currentActor->x_dest;
@@ -868,7 +869,6 @@
 							break;
 						}
 					}
-					break;
 				}
 
 				// Walk animations
@@ -907,8 +907,6 @@
 							currentActor->x, currentActor->y, newA, currentActor->poly);
 						break;
 					}
-
-					break;
 				}
 				case ANIM_PHASE_END:
 				{

Modified: scummvm/trunk/engines/cruise/actor.h
===================================================================
--- scummvm/trunk/engines/cruise/actor.h	2009-03-02 08:44:30 UTC (rev 39065)
+++ scummvm/trunk/engines/cruise/actor.h	2009-03-02 09:14:36 UTC (rev 39066)
@@ -36,6 +36,11 @@
 	ANIM_PHASE_END = 4
 };
 
+enum ATP {
+	ATP_MOUSE = 0,
+	ATP_TRACK = 1
+};
+
 struct actorStruct {
 	struct actorStruct *next;
 	struct actorStruct *prev;


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