aboutsummaryrefslogtreecommitdiff
path: root/src/game/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r--src/game/Map.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index b7612e56072..5aeb043a92f 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -519,9 +519,14 @@ Map::Add(T *obj)
return;
}
- obj->SetMap(this);
-
Cell cell(p);
+ if(obj->IsInWorld()) // need some clean up later
+ {
+ UpdateObjectVisibility(obj,cell,p); // is this needed?
+ AddNotifier(obj);
+ return;
+ }
+
if(obj->isActiveObject())
EnsureGridLoadedAtEnter(cell);
else
@@ -531,6 +536,7 @@ Map::Add(T *obj)
assert( grid != NULL );
AddToGrid(obj,grid,cell);
+ obj->SetMap(this);
obj->AddToWorld();
if(obj->isActiveObject())