added status

This commit is contained in:
Dave Schuyler 2005-06-17 02:23:30 +00:00
parent 0985f1d169
commit 3313716e05
2 changed files with 26 additions and 2 deletions

View File

@ -68,6 +68,19 @@ class DistributedObject(PandaObject):
#zone of the distributed object, default to 0
self.zone = 0
if __debug__:
def status(self):
try:
print "doId is", self.doId
print "parentId is", self.parentId
print "zoneId is", self.zoneId
print "class name is", self.__class__.__name__
print "generated is", self.activeState == ESGenerated
print "disabled is", self.activeState < ESGenerating
print "neverDisable is", self.neverDisable
print "cacheable is", self.cacheable
except: pass
def setNeverDisable(self, bool):
assert((bool == 1) or (bool == 0))

View File

@ -2,12 +2,12 @@
from direct.directnotify.DirectNotifyGlobal import *
from direct.showbase import PythonUtil
from direct.showbase import DirectObject
from direct.showbase.DirectObject import DirectObject
from pandac.PandaModules import *
from PyDatagram import PyDatagram
from PyDatagramIterator import PyDatagramIterator
class DistributedObjectAI(DirectObject.DirectObject):
class DistributedObjectAI(DirectObject):
notify = directNotify.newCategory("DistributedObjectAI")
QuietZone = 1
@ -46,6 +46,17 @@ class DistributedObjectAI(DirectObject.DirectObject):
# For debugging purposes, this just prints out what got deleted
# """
# print ("Destructing: " + self.__class__.__name__)
if __debug__:
def status(self):
try:
print "doId is", self.doId
print "parentId is", self.parentId
print "zoneId is", self.zoneId
print "class name is", self.__class__.__name__
print "isGenerated() is", self.isGenerated()
print "isDeleted() is", self.isDeleted()
except: pass
def getDeleteEvent(self):
# this is sent just before we get deleted