mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 11:28:17 -04:00
parentId added to generateWithRequiredAndId.
This commit is contained in:
parent
c27ec35667
commit
95f37c45c1
@ -302,6 +302,21 @@ class DistributedObjectAI(DirectObject.DirectObject):
|
|||||||
|
|
||||||
# this is a special generate used for estates, or anything else that
|
# this is a special generate used for estates, or anything else that
|
||||||
# needs to have a hard coded doId as assigned by the server
|
# needs to have a hard coded doId as assigned by the server
|
||||||
|
if wantOtpServer:
|
||||||
|
def generateWithRequiredAndId(self, doId, parentId, zoneId, optionalFields=[]):
|
||||||
|
assert self.notify.debugStateCall(self)
|
||||||
|
# have we already allocated a doId?
|
||||||
|
if self.__preallocDoId:
|
||||||
|
assert doId == self.__preallocDoId
|
||||||
|
self.__preallocDoId = 0
|
||||||
|
|
||||||
|
# The repository is the one that really does the work
|
||||||
|
self.air.generateWithRequiredAndId(self, doId, parentId, zoneId, optionalFields)
|
||||||
|
self.parentId = parentId
|
||||||
|
self.zoneId = zoneId
|
||||||
|
self.__location = (parentId, zoneId)
|
||||||
|
self.generate()
|
||||||
|
else:
|
||||||
def generateWithRequiredAndId(self, doId, zoneId, optionalFields=[]):
|
def generateWithRequiredAndId(self, doId, zoneId, optionalFields=[]):
|
||||||
assert self.notify.debugStateCall(self)
|
assert self.notify.debugStateCall(self)
|
||||||
# have we already allocated a doId?
|
# have we already allocated a doId?
|
||||||
@ -311,11 +326,6 @@ class DistributedObjectAI(DirectObject.DirectObject):
|
|||||||
|
|
||||||
# The repository is the one that really does the work
|
# The repository is the one that really does the work
|
||||||
self.air.generateWithRequiredAndId(self, doId, zoneId, optionalFields)
|
self.air.generateWithRequiredAndId(self, doId, zoneId, optionalFields)
|
||||||
if wantOtpServer:
|
|
||||||
#HACK:
|
|
||||||
if not hasattr(self, 'parentId'):
|
|
||||||
parentId = self.air.districtId
|
|
||||||
self.parentId = parentId
|
|
||||||
self.zoneId = zoneId
|
self.zoneId = zoneId
|
||||||
self.generate()
|
self.generate()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user