Fix for teleporting out of a world and clearing visAvatar from all world grids.
This commit is contained in:
parent
8c5c7a6a82
commit
f48e9e530b
|
|
@ -75,7 +75,7 @@ class DistributedCartesianGrid(DistributedNode.DistributedNode,
|
|||
self.visContext = self.cr.addInterest(self.getDoId(), 0, self.uniqueName("visibility"))
|
||||
taskMgr.add(self.processVisibility, self.taskName("processVisibility"))
|
||||
|
||||
def stopProcessVisibility(self):
|
||||
def stopProcessVisibility(self,clearAll=False):
|
||||
taskMgr.remove(self.taskName("processVisibility"))
|
||||
if self.visContext is not None:
|
||||
self.cr.removeInterest(self.visContext)
|
||||
|
|
@ -83,6 +83,11 @@ class DistributedCartesianGrid(DistributedNode.DistributedNode,
|
|||
self.visAvatar = None
|
||||
self.visZone = None
|
||||
|
||||
# sometimes we also need to remove vis avatar from
|
||||
# my parent if it is also a grid
|
||||
if (clearAll):
|
||||
self.cr.doId2do[self.parentId].worldGrid.stopProcessVisibility()
|
||||
|
||||
def processVisibility(self, task):
|
||||
pos = self.visAvatar.getPos(self)
|
||||
# Check to make sure our x and y are positive
|
||||
|
|
|
|||
Loading…
Reference in New Issue