dont create a GridParent if you are not on the grid

This commit is contained in:
Joe Shochet 2006-02-27 23:36:34 +00:00
parent 2dfc813470
commit fbe9a82379
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ class DistributedNode(DistributedObject.DistributedObject, NodePath):
DistributedObject.DistributedObject.setLocation(self, parentId, zoneId)
parentObj = self.cr.doId2do.get(parentId)
if parentObj:
if parentObj.isGridParent():
# Make sure you in a zone that is in the grid before making a GridParent
if (parentObj.isGridParent() and (zoneId >= parentObj.startingZone)):
if not self.gridParent:
self.gridParent = GridParent.GridParent(self)
self.gridParent.setGridParent(parentObj, zoneId, teleport)