mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
changed get location
This commit is contained in:
parent
d240df33f6
commit
e9c5b8c8bc
@ -410,7 +410,12 @@ class DistributedObject(PandaObject):
|
||||
parentObj.handleChildArrive(self, zoneId)
|
||||
|
||||
def getLocation(self):
|
||||
return (self.parentId, self.zoneId)
|
||||
try:
|
||||
if self.parentId <= 0 and self.zoneId <= 0:
|
||||
return None
|
||||
return (self.parentId, self.zoneId)
|
||||
except AttributeError:
|
||||
return None
|
||||
|
||||
def handleChildArrive(self, childObj, zoneId):
|
||||
self.notify.debugCall()
|
||||
|
@ -204,7 +204,12 @@ class DistributedObjectAI(DirectObject):
|
||||
self.zoneId=zoneId
|
||||
|
||||
def getLocation(self):
|
||||
return (self.parentId, self.zoneId)
|
||||
try:
|
||||
if self.parentId <= 0 and self.zoneId <= 0:
|
||||
return None
|
||||
return (self.parentId, self.zoneId)
|
||||
except AttributeError:
|
||||
return None
|
||||
|
||||
else:
|
||||
# NON OTP
|
||||
|
Loading…
x
Reference in New Issue
Block a user