Update DOAI a bit: Simplify dependencies on AIR.
This commit is contained in:
parent
84fc894309
commit
1ca02ae9e1
|
|
@ -144,8 +144,6 @@ class DistributedObjectAI(DistributedObjectBase):
|
|||
barrier.cleanup()
|
||||
self.__barriers = {}
|
||||
|
||||
self.air.stopTrackRequestDeletedDO(self)
|
||||
|
||||
# DCR: I've re-enabled this block of code so that Toontown's
|
||||
# AI won't leak channels.
|
||||
# Let me know if it causes trouble.
|
||||
|
|
@ -153,10 +151,9 @@ class DistributedObjectAI(DistributedObjectBase):
|
|||
### block until a solution is thought out of how to prevent
|
||||
### this delete message or to handle this message better
|
||||
# TODO: do we still need this check?
|
||||
if not hasattr(self, "doNotDeallocateChannel"):
|
||||
if self.air and not hasattr(self.air, "doNotDeallocateChannel"):
|
||||
if self.air.minChannel <= self.doId <= self.air.maxChannel:
|
||||
self.air.deallocateChannel(self.doId)
|
||||
if not getattr(self, "doNotDeallocateChannel", False):
|
||||
if self.air:
|
||||
self.air.deallocateChannel(self.doId)
|
||||
self.air = None
|
||||
|
||||
self.parentId = None
|
||||
|
|
@ -198,9 +195,6 @@ class DistributedObjectAI(DistributedObjectBase):
|
|||
"""
|
||||
pass
|
||||
|
||||
def addInterest(self, zoneId, note="", event=None):
|
||||
self.air.addInterest(self.doId, zoneId, note, event)
|
||||
|
||||
def b_setLocation(self, parentId, zoneId):
|
||||
self.d_setLocation(parentId, zoneId)
|
||||
self.setLocation(parentId, zoneId)
|
||||
|
|
@ -272,9 +266,6 @@ class DistributedObjectAI(DistributedObjectBase):
|
|||
|
||||
dclass.receiveUpdateOther(self, di)
|
||||
|
||||
def sendSetZone(self, zoneId):
|
||||
self.air.sendSetZone(self, zoneId)
|
||||
|
||||
def startMessageBundle(self, name):
|
||||
self.air.startMessageBundle(name)
|
||||
def sendMessageBundle(self):
|
||||
|
|
@ -480,7 +471,6 @@ class DistributedObjectAI(DistributedObjectBase):
|
|||
(self.__class__, doId))
|
||||
return
|
||||
self.air.requestDelete(self)
|
||||
self.air.startTrackRequestDeletedDO(self)
|
||||
self._DOAI_requestedDelete = True
|
||||
|
||||
def taskName(self, taskString):
|
||||
|
|
|
|||
Loading…
Reference in New Issue