From ea262c92cb1e6bdfb1ca017653fb959b5ea1d41e Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Wed, 26 Nov 2003 02:57:13 +0000 Subject: [PATCH] optimizations --- direct/src/level/DistributedEntity.py | 2 ++ direct/src/level/Entity.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/direct/src/level/DistributedEntity.py b/direct/src/level/DistributedEntity.py index 90857b42de..f6c77072c4 100755 --- a/direct/src/level/DistributedEntity.py +++ b/direct/src/level/DistributedEntity.py @@ -42,7 +42,9 @@ class DistributedEntity(DistributedObject.DistributedObject, Entity.Entity): DistributedEntity.notify.debug('disable (%s)' % self.entId) # stop things self.destroy() + DistributedObject.DistributedObject.disable(self) def delete(self): DistributedEntity.notify.debug('delete') # unload things + DistributedObject.DistributedObject.delete(self) diff --git a/direct/src/level/Entity.py b/direct/src/level/Entity.py index 295f9bd447..c60aa32225 100755 --- a/direct/src/level/Entity.py +++ b/direct/src/level/Entity.py @@ -78,9 +78,10 @@ class Entity(DirectObject): # this will be called with each item of our spec data on initialization def setAttribInit(self, attrib, value): - if hasattr(self, attrib): - Entity.notify.warning('%s already has member %s in %s' % - (self, attrib, lineInfo()[2])) + if __debug__: + if hasattr(self, attrib): + Entity.notify.warning('%s already has member %s in %s' % + (self, attrib, lineInfo()[2])) # TODO: we should probably put this crep in a dictionary # rather than dump it into the entity's namespace self.__dict__[attrib] = value