summaryrefslogtreecommitdiff
path: root/src/graphic/graphic.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-13 12:04:24 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-13 12:04:24 +0000
commitaec5250a740302fbf7b64eb1250d5ad15eaee57e (patch)
tree2c9de3e9fb8afe90b2cf85a7d032aae3966b61f6 /src/graphic/graphic.cpp
parentba5dc49d30d6ba465b01dbf3abc933250edcb6c6 (diff)
downloadmana-aec5250a740302fbf7b64eb1250d5ad15eaee57e.tar.gz
mana-aec5250a740302fbf7b64eb1250d5ad15eaee57e.tar.bz2
mana-aec5250a740302fbf7b64eb1250d5ad15eaee57e.tar.xz
mana-aec5250a740302fbf7b64eb1250d5ad15eaee57e.zip
Don't skip corners in A* pathfinding algorithm.
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r--src/graphic/graphic.cpp5
1 files changed, 3 insertions, 2 deletions
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