diff --git a/direct/src/distributed/DistributedObject.py b/direct/src/distributed/DistributedObject.py index 14e4c617aa..f42c66de34 100644 --- a/direct/src/distributed/DistributedObject.py +++ b/direct/src/distributed/DistributedObject.py @@ -342,6 +342,8 @@ class DistributedObject(PandaObject): self.cr.addInterest(self.getDoId(), zoneId, note, event) def setLocation(self, parentId, zoneId): + #print "%s setLocation %s, %s" % (self.doId, parentId, zoneId) + # The store must run first so we know the old location #self.cr.storeObjectLocation(self.doId, parentId, zoneId) self.__location = (parentId, zoneId) diff --git a/direct/src/distributed/DistributedObjectAI.py b/direct/src/distributed/DistributedObjectAI.py index 7947364138..c10f0b5544 100644 --- a/direct/src/distributed/DistributedObjectAI.py +++ b/direct/src/distributed/DistributedObjectAI.py @@ -142,7 +142,10 @@ class DistributedObjectAI(DirectObject.DirectObject): def setLocation(self, parentId, zoneId): # The store must run first so we know the old location self.air.sendSetLocation(self, parentId, zoneId) + self.__location = (parentId, zoneId) + def getLocation(self): + return self.__location if 0: # this is untested: def setLocation(self, parentId, zoneId): @@ -150,8 +153,6 @@ class DistributedObjectAI(DirectObject.DirectObject): self.air.storeObjectLocation(self.doId, parentId, zoneId) self.__location = (parentId, zoneId) - def getLocation(self): - return self.__location def updateRequiredFields(self, dclass, di): dclass.receiveUpdateBroadcastRequired(self, di)