clearly marked spots where attributes are set on init
This commit is contained in:
parent
1b04e361d6
commit
775083920f
|
|
@ -28,6 +28,10 @@ class DistributedEntity(DistributedObject.DistributedObject, Entity.Entity):
|
|||
self.entId = entId
|
||||
|
||||
def announceGenerate(self):
|
||||
###
|
||||
### THIS IS WHERE CLIENT-SIDE DISTRIBUTED ENTITIES GET THEIR
|
||||
### ATTRIBUTES SET
|
||||
###
|
||||
DistributedEntity.notify.debug('announceGenerate (%s)' % self.entId)
|
||||
|
||||
# ask our level obj for our spec data
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ class DistributedEntityAI(DistributedObjectAI.DistributedObjectAI,
|
|||
'DistributedEntityAI')
|
||||
|
||||
def __init__(self, level, entId):
|
||||
###
|
||||
### THIS IS WHERE AI-SIDE DISTRIBUTED ENTITIES GET THEIR ATTRIBUTES SET
|
||||
###
|
||||
DistributedObjectAI.DistributedObjectAI.__init__(self, level.air)
|
||||
self.levelDoId = level.doId
|
||||
Entity.Entity.__init__(self, level, entId)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ class Entity(DirectObject):
|
|||
self.initializeEntity(level, entId)
|
||||
|
||||
def initializeEntity(self, level, entId):
|
||||
###
|
||||
### THIS IS WHERE ENTITIES GET THEIR ATTRIBUTES SET
|
||||
###
|
||||
"""Distributed entities on the client don't know their level or
|
||||
entId values until they've been generated, so they call this
|
||||
after they've been generated. At that point, the entity is good
|
||||
|
|
|
|||
Loading…
Reference in New Issue