*Improvements in map managing.
--HG-- branch : trunk
This commit is contained in:
@@ -106,7 +106,7 @@ void MapManager::LoadTransports()
|
||||
m_TransportsByMap[*i].insert(t);
|
||||
|
||||
//If we someday decide to use the grid to track transports, here:
|
||||
t->SetMap(MapManager::Instance().CreateMap(mapid, t));
|
||||
t->SetMap(MapManager::Instance().CreateMap(mapid, t, 0));
|
||||
|
||||
//t->GetMap()->Add<GameObject>((GameObject *)t);
|
||||
++count;
|
||||
@@ -459,8 +459,12 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
|
||||
//we need to create and save new Map object with 'newMapid' because if not done -> lead to invalid Map object reference...
|
||||
//player far teleport would try to create same instance, but we need it NOW for transport...
|
||||
//correct me if I'm wrong O.o
|
||||
Map * newMap = MapManager::Instance().CreateMap(newMapid, this);
|
||||
//yes, you're right
|
||||
|
||||
ResetMap();
|
||||
Map * newMap = MapManager::Instance().CreateMap(newMapid, this, 0);
|
||||
SetMap(newMap);
|
||||
assert (GetMap());
|
||||
|
||||
if(oldMap != newMap)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user