From 1131c48f267ead31a21eaf91a8ab2175050bf983 Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Sun, 3 Jan 2010 01:10:07 +0000 Subject: fixed broken pathfinding svn-id: r46910 --- engines/teenagent/scene.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/teenagent') diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index d92c80a3ac..c73769f82c 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -56,6 +56,7 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi debug(1, "findPath %d,%d -> %d,%d", src.x, src.y, dst.x, dst.y); p.clear(); + p.push_back(src); p.push_back(dst); Common::List boxes; @@ -132,7 +133,7 @@ bool Scene::findPath(Scene::Path &p, const Common::Point &src, const Common::Poi if (wi == boxes.end()) ++i; } - + p.pop_front(); return true; } -- cgit v1.2.3