From aec5250a740302fbf7b64eb1250d5ad15eaee57e Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 13 Feb 2005 12:04:24 +0000 Subject: Don't skip corners in A* pathfinding algorithm. --- src/graphic/graphic.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/graphic/graphic.cpp') diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 107c441f..d39338de 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -505,9 +505,10 @@ void Engine::draw() Tile *tile = tiledMap.getTile(debugPath->x, debugPath->y); std::stringstream cost; - cost << tile->Fcost; + cost << tile->Gcost; guiGraphics->_beginDraw(); - guiGraphics->drawText(cost.str(), destRect.x - 12, destRect.y + 8); + guiGraphics->drawText(cost.str(), destRect.x + 4, destRect.y + 12, + gcn::Graphics::CENTER); guiGraphics->_endDraw(); // Move to the next node -- cgit v1.2.3-70-g09d2