summaryrefslogtreecommitdiff
path: root/src/net/manaserv/itemhandler.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-29 01:50:58 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-29 01:50:58 +0200
commitf90aa61947641f3db809e047f80fc7b8c865cb94 (patch)
tree0651f81765437772d0f20ee44acb75b76bd64c15 /src/net/manaserv/itemhandler.cpp
parent15c69030f987bd7d67fdbaf2158b2c3ae430143f (diff)
downloadMana-f90aa61947641f3db809e047f80fc7b8c865cb94.tar.gz
Mana-f90aa61947641f3db809e047f80fc7b8c865cb94.tar.bz2
Mana-f90aa61947641f3db809e047f80fc7b8c865cb94.tar.xz
Mana-f90aa61947641f3db809e047f80fc7b8c865cb94.zip
Made the flooritems position set back in pixels.
The position is centered to the nearest tile center in tA.
Diffstat (limited to 'src/net/manaserv/itemhandler.cpp')
-rw-r--r--src/net/manaserv/itemhandler.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/net/manaserv/itemhandler.cpp b/src/net/manaserv/itemhandler.cpp
index af3457db..d8365d79 100644
--- a/src/net/manaserv/itemhandler.cpp
+++ b/src/net/manaserv/itemhandler.cpp
@@ -26,8 +26,6 @@
#include "net/manaserv/manaserv_protocol.h"
#include "net/manaserv/messagein.h"
-#include "game.h"
-#include "map.h"
#include "log.h"
namespace ManaServ {
@@ -58,21 +56,7 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
if (itemId)
{
- if (Game *game = Game::instance())
- {
- if (Map *map = game->getCurrentMap())
- {
- actorSpriteManager->createItem(id, itemId,
- x / map->getTileWidth(),
- y / map->getTileHeight());
- }
- else
- {
- logger->log(
- "ItemHandler: An item wasn't created "
- "because of Game/Map not initialized...");
- }
- }
+ actorSpriteManager->createItem(id, itemId, Vector(x, y));
}
else if (FloorItem *item = actorSpriteManager->findItem(id))
{