aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/statics.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 0bb61fb803..d54b1d1c89 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -641,14 +641,18 @@ void Movement::removeFirstPhase() {
}
void Movement::gotoNextFrame(int callback1, int callback2) {
+ debug(0, "Movement::gotoNextFrame(%d, %d)", callback1, callback2);
+
if (!callback2) {
if (_currMovement) {
if ((uint)_currDynamicPhaseIndex == _currMovement->_dynamicPhases.size() - 1
- && !(((DynamicPhase *)(_currMovement->_dynamicPhases.back()))->_countdown))
+ && !(((DynamicPhase *)(_currMovement->_dynamicPhases.back()))->_countdown)) {
return;
+ }
} else if ((uint)_currDynamicPhaseIndex == _dynamicPhases.size() - 1
- && !(((DynamicPhase *)(_dynamicPhases.back()))->_countdown))
+ && !(((DynamicPhase *)(_dynamicPhases.back()))->_countdown)) {
return;
+ }
}
if (_currDynamicPhase->_countdown) {
@@ -751,10 +755,10 @@ void Movement::gotoPrevFrame(int callback1, int callback2) {
void Movement::gotoLastFrame() {
if (_currMovement) {
- while ((uint)_currDynamicPhaseIndex != _currMovement->_dynamicPhases.size())
+ while ((uint)_currDynamicPhaseIndex != _currMovement->_dynamicPhases.size() - 1)
gotoNextFrame(0, 0);
} else {
- while ((uint)_currDynamicPhaseIndex != _dynamicPhases.size())
+ while ((uint)_currDynamicPhaseIndex != _dynamicPhases.size() - 1)
gotoNextFrame(0, 0);
}
}