mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Change so generate is called before set location (since generate will cause reparenting at the OTP level which will invalidate any parenting done in setLocation)
This commit is contained in:
parent
0b3f17397b
commit
0e2fd05bae
@ -338,9 +338,9 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# Just update it.
|
||||
distObj = self.doId2do[doId]
|
||||
assert(distObj.dclass == dclass)
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generate()
|
||||
distObj.updateRequiredFields(dclass, di)
|
||||
# updateRequiredFields calls announceGenerate
|
||||
elif self.cache.contains(doId):
|
||||
@ -351,9 +351,9 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# put it in the dictionary:
|
||||
self.doId2do[doId] = distObj
|
||||
# and update it.
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generate()
|
||||
distObj.updateRequiredFields(dclass, di)
|
||||
# updateRequiredFields calls announceGenerate
|
||||
else:
|
||||
@ -369,10 +369,10 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# Put the new do in the dictionary
|
||||
self.doId2do[doId] = distObj
|
||||
# Update the required fields
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generateInit() # Only called when constructed
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.updateRequiredFields(dclass, di)
|
||||
# updateRequiredFields calls announceGenerate
|
||||
if wantOtpServer:
|
||||
@ -396,13 +396,13 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# Put the new do in the dictionary
|
||||
self.doId2do[doId] = distObj
|
||||
# Update the required fields
|
||||
distObj.generateInit() # Only called when constructed
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
# TODO: ROGER: where should we get parentId and zoneId?
|
||||
parentId = None
|
||||
zoneId = None
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generateInit() # Only called when constructed
|
||||
distObj.generate()
|
||||
# updateRequiredFields calls announceGenerate
|
||||
return distObj
|
||||
|
||||
@ -412,9 +412,9 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# Just update it.
|
||||
distObj = self.doId2do[doId]
|
||||
assert(distObj.dclass == dclass)
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generate()
|
||||
distObj.updateRequiredOtherFields(dclass, di)
|
||||
# updateRequiredOtherFields calls announceGenerate
|
||||
elif self.cache.contains(doId):
|
||||
@ -425,9 +425,9 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# put it in the dictionary:
|
||||
self.doId2do[doId] = distObj
|
||||
# and update it.
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generate()
|
||||
distObj.updateRequiredOtherFields(dclass, di)
|
||||
# updateRequiredOtherFields calls announceGenerate
|
||||
else:
|
||||
@ -443,10 +443,10 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# Put the new do in the dictionary
|
||||
self.doId2do[doId] = distObj
|
||||
# Update the required fields
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.generateInit() # Only called when constructed
|
||||
distObj.generate()
|
||||
if wantOtpServer:
|
||||
distObj.setLocation(parentId, zoneId)
|
||||
distObj.updateRequiredOtherFields(dclass, di)
|
||||
# updateRequiredOtherFields calls announceGenerate
|
||||
return distObj
|
||||
|
Loading…
x
Reference in New Issue
Block a user