From 7657ec87dcae8dd12186c65448cb6fe743849e4d Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Sun, 17 May 2009 01:41:46 +0200 Subject: Fix offset error on where command. Both mPx/mPy and mPos vector have the extra 16,32 pixels. (cherry picked from commit afe09f20caa9ee3a690ea2b84bdaee19464b45bc) --- src/commandhandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 462cb3b9..f2fafed4 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -279,9 +279,9 @@ void CommandHandler::handleWhere(const std::string &args, ChatTab *tab) { std::ostringstream where; where << map_path << ", coordinates: " - << (player_node->getPixelX() / 32) << ", " - << ((player_node->getPixelY() / 32) - 1); // Not real sure why we remove 1, - // but it makes it in sync with @where + << ((player_node->getPixelX() - 16) / 32) << ", " + << ((player_node->getPixelY() - 32) / 32); + tab->chatLog(where.str(), BY_SERVER); } -- cgit v1.2.3-70-g09d2