guard for calling setLocation twice

This commit is contained in:
Joe Shochet 2005-03-16 00:05:16 +00:00
parent 25dd2c7217
commit 0b3f17397b

View File

@ -152,6 +152,8 @@ class DistributedObjectAI(DirectObject.DirectObject):
def setLocation(self, parentId, zoneId):
oldParentId = self.parentId
oldZoneId = self.zoneId
if ((oldParentId != parentId) or
(oldZoneId != zoneId)):
self.zoneId = zoneId
self.parentId = parentId
self.air.changeDOZoneInTables(self, zoneId, oldZoneId)