From 46316fdb63c5ce945fbad3434d9078628014097a Mon Sep 17 00:00:00 2001 From: Retro-Junk Date: Tue, 30 Aug 2016 22:50:54 +0300 Subject: FULLPIPE: Fix length calculation in AniHandler::getNumCycles --- engines/fullpipe/anihandler.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/anihandler.cpp b/engines/fullpipe/anihandler.cpp index 71c894b9fe..126abbf247 100644 --- a/engines/fullpipe/anihandler.cpp +++ b/engines/fullpipe/anihandler.cpp @@ -639,7 +639,6 @@ Common::Point *AniHandler::getNumCycles(Common::Point *pRes, Movement *mov, int int p1y = point.y; int newmult = 0; - int oldlen = *len; if (abs(p1y) > abs(p1x)) { if (mov->calcSomeXY(point, 0, -1)->y) @@ -685,13 +684,13 @@ Common::Point *AniHandler::getNumCycles(Common::Point *pRes, Movement *mov, int int p2x = 0; int p2y = 0; - if (!oldlen) - oldlen = -1; + if (!*len) + *len = -1; - if (oldlen > 0) { + if (*len > 0) { ++*mult; - mov->calcSomeXY(point, 0, oldlen); + mov->calcSomeXY(point, 0, *len); p2x = point.x; p2y = point.y; -- cgit v1.2.3