aboutsummaryrefslogtreecommitdiff
path: root/src/game/Map.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-11 10:01:39 -0500
committermegamage <none@none>2009-08-11 10:01:39 -0500
commite3d00708a9e018ae4adf9f4957d5df27b5245a8c (patch)
tree3dc9a3906027b604ff5038a858d2f9081be9fe20 /src/game/Map.cpp
parent6cb0466eea4c647bf65d9637b3820ccef56638ee (diff)
*Fix a crash since the last rev.
--HG-- branch : trunk
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())