From d4a14c08b554f80c1e8205660a9b66fc5cff4393 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Dec 2012 20:56:24 +0300 Subject: Fix tile distance numbers in debug mode map draw. --- src/gui/viewport.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index fcd62caa5..df5fe4353 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -362,6 +362,7 @@ void Viewport::_drawPath(Graphics *const graphics, const Path &path, if (Net::getNetworkType() != ServerInfo::MANASERV) #endif { + int cnt = 1; for (Path::const_iterator i = path.begin(), i_end = path.end(); i != i_end; ++i) { @@ -371,10 +372,10 @@ void Viewport::_drawPath(Graphics *const graphics, const Path &path, graphics->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8)); if (mMap) { - graphics->drawText( - toString(mMap->getMetaTile(i->x, i->y)->Gcost), + graphics->drawText(toString(cnt), squareX + 4, squareY + 12, gcn::Graphics::CENTER); } + cnt ++; } } #ifdef MANASERV_SUPPORT -- cgit v1.2.3-60-g2f50