aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/actor.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-03-02 09:14:36 +0000
committerPaul Gilbert2009-03-02 09:14:36 +0000
commit2d9705311e9acafd01f5f8fa1b617915c1cd6fb0 (patch)
tree8227031cbb3b02af9a035a6510a3134b08b00619 /engines/cruise/actor.cpp
parentf1044e85b2d75c449ce687fda6b170077a37a454 (diff)
downloadscummvm-rg350-2d9705311e9acafd01f5f8fa1b617915c1cd6fb0.tar.gz
scummvm-rg350-2d9705311e9acafd01f5f8fa1b617915c1cd6fb0.tar.bz2
scummvm-rg350-2d9705311e9acafd01f5f8fa1b617915c1cd6fb0.zip
Bugfix for frequent freezes when doing actions - the main movement state switch statement was actually relying on falling through case statements to work properly
svn-id: r39066
Diffstat (limited to 'engines/cruise/actor.cpp')
-rw-r--r--engines/cruise/actor.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 233b11d17c..a2e0a76f2d 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -40,7 +40,7 @@ bool isAnimFinished(int overlayIdx, int idx, actorStruct *pStartEntry, int objTy
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 @@ void processAnimation(void) {
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 @@ void processAnimation(void) {
break;
}
}
- break;
}
// Walk animations
@@ -907,8 +907,6 @@ void processAnimation(void) {
currentActor->x, currentActor->y, newA, currentActor->poly);
break;
}
-
- break;
}
case ANIM_PHASE_END:
{