From a2bb676c19c70cd79f141650fe0587148c71702b Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Wed, 15 Dec 2010 23:52:24 +0000 Subject: HUGO: Fix pathfinding bug in 'bridge' screen (H3 Dos) svn-id: r54926 --- engines/hugo/route.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 8ae5be10cd..070e952747 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -275,9 +275,10 @@ void Route::segment(int16 x, int16 y) { Point *Route::newNode() { debugC(1, kDebugRoute, "newNode"); + _routeListIndex++; if (_routeListIndex >= kMaxNodes) // Too many nodes return 0; // Incomplete route - failure - _routeListIndex++; + _route[_routeListIndex] = _route[_routeListIndex - 1]; // Initialize with previous node return &_route[_routeListIndex]; } -- cgit v1.2.3