From fbe9a823797a6e0610da201db7d0b67376e53730 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Mon, 27 Feb 2006 23:36:34 +0000 Subject: [PATCH] dont create a GridParent if you are not on the grid --- direct/src/distributed/DistributedNode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/distributed/DistributedNode.py b/direct/src/distributed/DistributedNode.py index 37d5743e06..d4e56551a6 100644 --- a/direct/src/distributed/DistributedNode.py +++ b/direct/src/distributed/DistributedNode.py @@ -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)