From 3d952861b5cdbb63fd5c1c72286bd0c0f1785f2b Mon Sep 17 00:00:00 2001 From: Roger Hughston Date: Fri, 23 Jul 2004 02:19:31 +0000 Subject: [PATCH] Nallowing new Global DC objects that are always in scope --- direct/src/distributed/ClientRepository.py | 22 ++++++++++++++++++++++ direct/src/distributed/MsgTypes.py | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/direct/src/distributed/ClientRepository.py b/direct/src/distributed/ClientRepository.py index 9387309950..431df91e86 100644 --- a/direct/src/distributed/ClientRepository.py +++ b/direct/src/distributed/ClientRepository.py @@ -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. diff --git a/direct/src/distributed/MsgTypes.py b/direct/src/distributed/MsgTypes.py index cc3c52f81b..06737250bf 100644 --- a/direct/src/distributed/MsgTypes.py +++ b/direct/src/distributed/MsgTypes.py @@ -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