From f7b228cfd000a19d2d2c8c3bdf5935264985bc80 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Apr 2001 15:49:16 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/distributed/ClientDistClass.py | 4 ++-- direct/src/distributed/ClientDistUpdate.py | 7 +++++-- direct/src/distributed/ClientRepository.py | 4 ++-- direct/src/distributed/DistributedObject.py | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/direct/src/distributed/ClientDistClass.py b/direct/src/distributed/ClientDistClass.py index 79e939d18f..05bac0aa45 100644 --- a/direct/src/distributed/ClientDistClass.py +++ b/direct/src/distributed/ClientDistClass.py @@ -72,12 +72,12 @@ class ClientDistClass: cdu.updateField(self, do, di) return None - def sendUpdate(self, cr, do, fieldName, args): + def sendUpdate(self, cr, do, fieldName, args, sendToId = None): # Look up the cdu assert(self.name2CDU.has_key(fieldName)) cdu = self.name2CDU[fieldName] # Let the cdu finish the job - cdu.sendUpdate(cr, do, args) + cdu.sendUpdate(cr, do, args, sendToId) diff --git a/direct/src/distributed/ClientDistUpdate.py b/direct/src/distributed/ClientDistUpdate.py index 9efb33287c..f9b792d881 100644 --- a/direct/src/distributed/ClientDistUpdate.py +++ b/direct/src/distributed/ClientDistUpdate.py @@ -72,12 +72,15 @@ class ClientDistUpdate: for i in range(0, numElems): datagram.putArg(args[i], self.types[i], self.divisors[i]) - def sendUpdate(self, cr, do, args): + def sendUpdate(self, cr, do, args, sendToId = None): datagram = Datagram.Datagram() # Add message type datagram.addUint16(CLIENT_OBJECT_UPDATE_FIELD) # Add the DO id - datagram.addUint32(do.doId) + if sendToId == None: + datagram.addUint32(do.doId) + else: + datagram.addUint32(sendToId) # Add the field id datagram.addUint16(self.number) # Add the arguments diff --git a/direct/src/distributed/ClientRepository.py b/direct/src/distributed/ClientRepository.py index 0547fa844d..eb98984386 100644 --- a/direct/src/distributed/ClientRepository.py +++ b/direct/src/distributed/ClientRepository.py @@ -291,14 +291,14 @@ class ClientRepository(DirectObject.DirectObject): self.send(datagram) return None - def sendUpdate(self, do, fieldName, args): + def sendUpdate(self, do, fieldName, args, sendToId = None): # Get the DO id doId = do.doId # Get the cdc assert(self.doId2cdc.has_key(doId)) cdc = self.doId2cdc[doId] # Let the cdc finish the job - cdc.sendUpdate(self, do, fieldName, args) + cdc.sendUpdate(self, do, fieldName, args, sendToId) def send(self, datagram): #if self.notify.getDebug(): diff --git a/direct/src/distributed/DistributedObject.py b/direct/src/distributed/DistributedObject.py index b2cc1774aa..9662fe5853 100644 --- a/direct/src/distributed/DistributedObject.py +++ b/direct/src/distributed/DistributedObject.py @@ -117,8 +117,8 @@ class DistributedObject(PandaObject): cdc.updateField(self, di) return None - def sendUpdate(self, fieldName, args): - self.cr.sendUpdate(self, fieldName, args) + def sendUpdate(self, fieldName, args, sendToId = None): + self.cr.sendUpdate(self, fieldName, args, sendToId) def taskName(self, taskString): return (taskString + "-" + str(self.getDoId()))