DistributedObjectGlobal.py 870 B

1234567891011121314151617181920212223
  1. """DistributedObjectGlobal module: contains the DistributedObjectGlobal class"""
  2. from direct.directnotify.DirectNotifyGlobal import directNotify
  3. from direct.distributed.DistributedObject import DistributedObject
  4. class DistributedObjectGlobal(DistributedObject):
  5. """
  6. The Distributed Object Global class is the base class for global
  7. network based (i.e. distributed) objects.
  8. """
  9. notify = directNotify.newCategory("DistributedObjectGlobal")
  10. # A few objects will set neverDisable to 1... Examples are
  11. # localToon, and anything that lives in the UberZone. This
  12. # keeps them from being disabled when you change zones,
  13. # even to the quiet zone.
  14. neverDisable = 1
  15. def __init__(self, cr):
  16. assert self.notify.debugStateCall(self)
  17. DistributedObject.__init__(self, cr)
  18. self.parentId = 0
  19. self.zoneId = 0