mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
33 lines
1,018 B
Python
33 lines
1,018 B
Python
|
|
||
|
from DistributedObjectAI import DistributedObjectAI
|
||
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||
|
|
||
|
|
||
|
class DistributedObjectGlobalAI(DistributedObjectAI):
|
||
|
notify = directNotify.newCategory('DistributedObjectGlobalAI')
|
||
|
|
||
|
doNotDeallocateChannel = 1
|
||
|
isGlobalDistObj = 1
|
||
|
|
||
|
def __init__(self, air):
|
||
|
DistributedObjectAI.__init__(self, air)
|
||
|
|
||
|
def announceGenerate(self):
|
||
|
DistributedObjectAI.announceGenerate(self)
|
||
|
try:
|
||
|
if not self.doNotListenToChannel:
|
||
|
self.air.registerForChannel(self.doId)
|
||
|
except AttributeError:
|
||
|
self.air.registerForChannel(self.doId)
|
||
|
return False
|
||
|
|
||
|
def delete(self):
|
||
|
DistributedObjectAI.delete(self)
|
||
|
try:
|
||
|
if not self.doNotListenToChannel:
|
||
|
self.air.unregisterForChannel(self.doId)
|
||
|
except AttributeError:
|
||
|
self.air.unregisterForChannel(self.doId)
|
||
|
## self.air.removeDOFromTables(self)
|
||
|
|