diff options
author | Arnaud Boutonné | 2010-12-15 23:52:24 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-12-15 23:52:24 +0000 |
commit | a2bb676c19c70cd79f141650fe0587148c71702b (patch) | |
tree | 347397bf62c75d2db24025fe32b1c8939cc6fe28 | |
parent | aa152358586b30e6087dac4473ea6e8ff3417ca0 (diff) | |
download | scummvm-rg350-a2bb676c19c70cd79f141650fe0587148c71702b.tar.gz scummvm-rg350-a2bb676c19c70cd79f141650fe0587148c71702b.tar.bz2 scummvm-rg350-a2bb676c19c70cd79f141650fe0587148c71702b.zip |
HUGO: Fix pathfinding bug in 'bridge' screen (H3 Dos)
svn-id: r54926
-rw-r--r-- | engines/hugo/route.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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]; } |