diff options
author | Eugene Sandulenko | 2013-08-05 21:25:41 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:10 +0300 |
commit | ab190d2f0b4c102d277b16adf66269d9a6380b81 (patch) | |
tree | 2910b260ef497f5d9585b3d76e507f504c70c86f /engines/fullpipe | |
parent | 35fbf39448f2450db4d03760a0a1e227a68c9cb0 (diff) | |
download | scummvm-rg350-ab190d2f0b4c102d277b16adf66269d9a6380b81.tar.gz scummvm-rg350-ab190d2f0b4c102d277b16adf66269d9a6380b81.tar.bz2 scummvm-rg350-ab190d2f0b4c102d277b16adf66269d9a6380b81.zip |
FULLPIPE: Fix Movement::gotoLastFrame()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/statics.cpp | 12 |
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); } } |