mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
Nallowing new Global DC objects that are always in scope
This commit is contained in:
parent
bfb064b72e
commit
3d952861b5
@ -181,6 +181,28 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
|
||||
# updateRequiredFields calls announceGenerate
|
||||
return distObj
|
||||
|
||||
def generateGlobalObject(self , doId, dcname):
|
||||
# Look up the dclass
|
||||
dclass = self.dclassesByName[dcname]
|
||||
# Create a new distributed object, and put it in the dictionary
|
||||
#distObj = self.generateWithRequiredFields(dclass, doId, di)
|
||||
|
||||
# Construct a new one
|
||||
classDef = dclass.getClassDef()
|
||||
if classDef == None:
|
||||
self.notify.error("Could not create an undefined %s object." % (dclass.getName()))
|
||||
distObj = classDef(self)
|
||||
distObj.dclass = dclass
|
||||
# Assign it an Id
|
||||
distObj.doId = doId
|
||||
# Put the new do in the dictionary
|
||||
self.doId2do[doId] = distObj
|
||||
# Update the required fields
|
||||
distObj.generateInit() # Only called when constructed
|
||||
distObj.generate()
|
||||
# updateRequiredFields calls announceGenerate
|
||||
return distObj
|
||||
|
||||
def generateWithRequiredOtherFields(self, dclass, doId, di):
|
||||
if self.doId2do.has_key(doId):
|
||||
# ...it is in our dictionary.
|
||||
|
@ -88,3 +88,7 @@ QUIET_ZONE_IGNORED_LIST = [
|
||||
CLIENT_LOGIN_2_GREEN = 1 # Disney's GoReg subscription token, not used.
|
||||
CLIENT_LOGIN_2_PLAY_TOKEN = 2 # VR Studio PlayToken.
|
||||
CLIENT_LOGIN_2_BLUE = 3 # The international GoReg token.
|
||||
|
||||
|
||||
# Global Object ID 's
|
||||
GLOBAL_ID_FRIEND_MANAGER= 4501
|
||||
|
Loading…
x
Reference in New Issue
Block a user