Browse Source

set object location to 0,0 when going into the cache, instead of None,None since when the object is pulled back out of the cache, None,None were not clearing out the old location.

Justin Butler 19 years ago
parent
commit
96780fc21f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      direct/src/distributed/DistributedObject.py

+ 2 - 2
direct/src/distributed/DistributedObject.py

@@ -183,7 +183,7 @@ class DistributedObject(DistributedObjectBase):
             self.activeState = ESDisabled
             self.activeState = ESDisabled
             self.__callbacks = {}
             self.__callbacks = {}
             #self.cr.deleteObjectLocation(self.doId, self.parentId, self.zoneId)
             #self.cr.deleteObjectLocation(self.doId, self.parentId, self.zoneId)
-            self.setLocation(None, None)
+            self.setLocation(0,0)
             # TODO: disable my children
             # TODO: disable my children
 
 
     def isDisabled(self):
     def isDisabled(self):
@@ -383,7 +383,7 @@ class DistributedObject(DistributedObjectBase):
         self.cr.sendSetLocation(self.doId, parentId, zoneId)
         self.cr.sendSetLocation(self.doId, parentId, zoneId)
 
 
     def setLocation(self, parentId, zoneId):
     def setLocation(self, parentId, zoneId):
-        self.cr.storeObjectLocation(self.doId, parentId, zoneId)
+        self.cr.storeObjectLocation(self.doId, parentId, zoneId, self)
 
 
     def getLocation(self):
     def getLocation(self):
         try:
         try: