summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-25 20:56:24 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-25 20:56:24 +0300
commitd4a14c08b554f80c1e8205660a9b66fc5cff4393 (patch)
tree7c9aa081a598305171b8ada2916ae52d8d62ea94 /src
parent1970fa612fd54256bbd92ce83ab7e53ea82f1f3b (diff)
downloadplus-d4a14c08b554f80c1e8205660a9b66fc5cff4393.tar.gz
plus-d4a14c08b554f80c1e8205660a9b66fc5cff4393.tar.bz2
plus-d4a14c08b554f80c1e8205660a9b66fc5cff4393.tar.xz
plus-d4a14c08b554f80c1e8205660a9b66fc5cff4393.zip
Fix tile distance numbers in debug mode map draw.
Diffstat (limited to 'src')
-rw-r--r--src/gui/viewport.cpp5
1 files 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