Browse Source

*** empty log message ***

Samir Naik 21 years ago
parent
commit
6656cd6351

+ 2 - 0
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)

+ 3 - 2
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)