Merge branch 'master' of github.com:edubart/otclient
This commit is contained in:
commit
36cdea7f29
|
@ -155,7 +155,6 @@ void Map::removeThingByPtr(ThingPtr thing)
|
|||
void Map::clean()
|
||||
{
|
||||
m_tiles.clear();
|
||||
m_creatures.clear();
|
||||
}
|
||||
|
||||
void Map::cleanTile(const Position& pos)
|
||||
|
|
|
@ -201,9 +201,6 @@ void Tile::removeThingByPtr(ThingPtr thing)
|
|||
|
||||
void Tile::clean()
|
||||
{
|
||||
for(const ThingPtr& thing : m_creatures)
|
||||
g_map.removeCreatureById(thing->getId());
|
||||
|
||||
m_itemsTop.clear();
|
||||
m_creatures.clear();
|
||||
m_itemsBottom.clear();
|
||||
|
|
|
@ -286,11 +286,6 @@ void ProtocolGame::parseMapDescription(InputMessage& msg)
|
|||
{
|
||||
Position pos = parsePosition(msg);
|
||||
m_localPlayer->setPosition(pos);
|
||||
|
||||
// we must clean, creatures and all.
|
||||
g_map.clean();
|
||||
|
||||
// now we get new map.
|
||||
setMapDescription(msg, pos.x - 8, pos.y - 6, pos.z, 18, 14);
|
||||
}
|
||||
|
||||
|
@ -952,10 +947,12 @@ ThingPtr ProtocolGame::internalGetThing(InputMessage& msg)
|
|||
creature = knownCreature;
|
||||
}
|
||||
else if(thingId == 0x0061) { //creature is not known
|
||||
/*uint32 removeId = */msg.getU32();
|
||||
uint32 removeId = msg.getU32();
|
||||
uint32 id = msg.getU32();
|
||||
std::string name = msg.getString();
|
||||
|
||||
g_map.removeCreatureById(removeId);
|
||||
|
||||
LocalPlayerPtr localPlayer = g_game.getLocalPlayer();
|
||||
if(localPlayer->getId() == id)
|
||||
creature = localPlayer->asCreature();
|
||||
|
|
Loading…
Reference in New Issue