From fa4d2a16a3c98e46cac499b7b7878a5859b858fd Mon Sep 17 00:00:00 2001 From: Justin Butler Date: Fri, 1 Jul 2005 21:57:26 +0000 Subject: [PATCH] Fix to support teleporting into a treasure map on a ship. --- direct/src/distributed/DistributedCartesianGrid.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/direct/src/distributed/DistributedCartesianGrid.py b/direct/src/distributed/DistributedCartesianGrid.py index f4372b6f52..97357c350a 100755 --- a/direct/src/distributed/DistributedCartesianGrid.py +++ b/direct/src/distributed/DistributedCartesianGrid.py @@ -138,9 +138,11 @@ class DistributedCartesianGrid(DistributedNode.DistributedNode, def removeObjectFromGrid(self, av): # TODO: WHAT LOCATION SHOULD WE SET THIS TO? #av.reparentTo(hidden) - av.detachNode() + if (av.getParent().compareTo(self) == 0): + # only detach if object is directly parented + av.detachNode() #av.b_setLocation(0,0) - + def handleAvatarZoneChange(self, av, zoneId): assert self.notify.debug("handleAvatarZoneChange(%s, %s)" % (av.doId, zoneId))