diff options
-rw-r--r-- | engines/fullpipe/scenes/scene09.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp index a50cd3a163..e265e707fd 100644 --- a/engines/fullpipe/scenes/scene09.cpp +++ b/engines/fullpipe/scenes/scene09.cpp @@ -376,17 +376,14 @@ void sceneHandler09_checkHangerCollide() { for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) { for (int j = 0; j < 4; j++) { - hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y); + int x1 = newx + g_vars->scene09_hangerOffsets[j].x; + int y1 = ball->_oy + g_vars->scene09_hangerOffsets[j].y; - if (hit) { - uint32 pixel; - g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y, &pixel); - debugC(2, kDebugSceneLogic, "%x", pixel); - for (int k = 0; k < 20; k++) { - debugCN(2, kDebugSceneLogic, "%c", k == g_vars->scene09_hangerOffsets[j].x ? '@' : g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + k, ball->_oy + -15) ? '-' : ' '); - } - debugC(2, kDebugSceneLogic, ""); + // Check 2 pixels to compensate cord width + hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(x1, y1) + && g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(x1 + 10, y1); + if (hit) { sceneHandler09_ballExplode(b); break; } |