From 27346f8a08d16d06abba754abdee4517b964c466 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 11 May 2013 17:50:42 +0200 Subject: HOPKINS: Courtesy of SylvainTV - Fix long diagonals to bottom left and right --- engines/hopkins/lines.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/hopkins') diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 60b9b48880..791db4267a 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -2220,10 +2220,11 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) { realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize); realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize); } + int oldY = curY; for (int i = 0; i < realSpeedX; i++) { --curX; _smoothRoute[smoothIdx]._posX = curX; - if (curY != curY + realSpeedY) + if (curY != oldY + realSpeedY) curY++; _smoothRoute[smoothIdx]._posY = curY; smoothIdx++; @@ -2254,10 +2255,11 @@ bool LinesManager::makeSmoothMove(int fromX, int fromY, int destX, int destY) { realSpeedX = _vm->_graphicsMan->zoomIn(realSpeedX, spriteSize); realSpeedY = _vm->_graphicsMan->zoomIn(realSpeedY, spriteSize); } + int oldY = curY; for (int i = 0; i < realSpeedX; i++) { ++curX; _smoothRoute[smoothIdx]._posX = curX; - if (curY != curY + realSpeedY) + if (curY != oldY + realSpeedY) curY++; _smoothRoute[smoothIdx]._posY = curY; smoothIdx++; -- cgit v1.2.3