aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-10-02 12:37:45 +0200
committerEugene Sandulenko2016-10-02 13:01:39 +0200
commite2325f022be85750ae6434dbae38adbbd3f8e095 (patch)
tree6e5cdf11fe49584f4851289c6bcf6c3fa4074f46
parent454f20b948c2968056401270c14b135ce080da91 (diff)
downloadscummvm-rg350-e2325f022be85750ae6434dbae38adbbd3f8e095.tar.gz
scummvm-rg350-e2325f022be85750ae6434dbae38adbbd3f8e095.tar.bz2
scummvm-rg350-e2325f022be85750ae6434dbae38adbbd3f8e095.zip
FULLPIPE: Fix tube logic on scene37
-rw-r--r--engines/fullpipe/scenes/scene37.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/fullpipe/scenes/scene37.cpp b/engines/fullpipe/scenes/scene37.cpp
index 31b38c24ce..d4ecebca18 100644
--- a/engines/fullpipe/scenes/scene37.cpp
+++ b/engines/fullpipe/scenes/scene37.cpp
@@ -177,12 +177,19 @@ void sceneHandler37_updateRing(int ringNum) {
g_vars->scene37_pipeIsOpen = true;
- for (uint j = 0; j < g_vars->scene37_rings.size(); j++) {
- for (int i = 0; i < g_vars->scene37_rings[j]->numSubRings; i++) {
- ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[j]->subRings[i]);
+ for (uint i = 0; i < g_vars->scene37_rings.size(); i++) {
+ for (int j = 0; j < g_vars->scene37_rings[i]->numSubRings; j++) {
+ ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_RING, g_vars->scene37_rings[i]->subRings[j]);
- if ((ani->_movement && ani->_movement->_id == MV_RNG_CLOSE) || ani->_statics->_staticsId == ST_RNG_CLOSED2)
- g_vars->scene37_pipeIsOpen = false;
+ debugC(2, kDebugSceneLogic, "ring[%d][%d]: mov: %d st: %d", i, j, (ani->_movement ? ani->_movement->_id : 0), ani->_statics->_staticsId);
+
+ if (ani->_movement) {
+ if (ani->_movement->_id == MV_RNG_CLOSE)
+ g_vars->scene37_pipeIsOpen = false;
+ } else {
+ if (ani->_statics->_staticsId == ST_RNG_CLOSED2)
+ g_vars->scene37_pipeIsOpen = false;
+ }
}
}