From bf18084c21cd2c7bf0853e40917767665662b36f Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Wed, 23 Nov 2005 23:53:32 +0000 Subject: [PATCH] make location components explicit --- direct/src/distributed/DoCollectionManager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/src/distributed/DoCollectionManager.py b/direct/src/distributed/DoCollectionManager.py index 3b6cddd5cb..7143fa2654 100755 --- a/direct/src/distributed/DoCollectionManager.py +++ b/direct/src/distributed/DoCollectionManager.py @@ -294,19 +294,19 @@ class DoCollectionManager: self.zoneId2doIds.setdefault(newLocation, {}) self.zoneId2doIds[newLocation][do.doId]=do - def getObjectsInZone(self, location): + def getObjectsInZone(self, parentId, zoneId): """ call this to get a dict of doId:distObj for a zone. Creates a shallow copy, so you can do whatever you want with the dict. """ assert self.notify.debugStateCall(self) - return copy.copy(self.zoneId2doIds.get(location, {})) + return copy.copy(self.zoneId2doIds.get((parentId, zoneId), {})) - def getObjectsOfClassInZone(self, location, objClass): + def getObjectsOfClassInZone(self, parentId, zoneId, objClass): """ returns dict of doId:object for a zone, containing all objects that inherit from 'class'. returned dict is safely mutable. """ assert self.notify.debugStateCall(self) doDict = {} - for doId, do in self.zoneId2doIds.get(location, {}).items(): + for doId, do in self.zoneId2doIds.get((parentId, zoneId), {}).items(): if isinstance(do, objClass): doDict[doId] = do return doDict