From 882fb179f0449c18a240551fda9fb8013611ea9c Mon Sep 17 00:00:00 2001 From: bobbybee Date: Fri, 15 Aug 2014 19:25:06 -0400 Subject: [PATCH] CLIENTAGENT_ADD_INTEREST method --- direct/src/distributed/AstronInternalRepository.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/direct/src/distributed/AstronInternalRepository.py b/direct/src/distributed/AstronInternalRepository.py index 5aed3d7b4d..e86b9cfdf6 100644 --- a/direct/src/distributed/AstronInternalRepository.py +++ b/direct/src/distributed/AstronInternalRepository.py @@ -467,6 +467,20 @@ class AstronInternalRepository(ConnectionRepository): dg.add_uint32(doId) self.send(dg) + def clientAddInterest(self, clientChannel, interestId, parentId, zoneId): + """ + Opens an interest on the behalf of the client. This, used in conjunction + with add_interest: visible (or preferably, disabled altogether), will mitigate + possible security risks. + """ + + dg = PyDatagram() + dg.addServerHeader(clientChanel, self.ourChannel, CLIENTAGENT_ADD_INTEREST) + dg.add_uint16(interestId) + dg.add_uint32(parentId) + dg.add_uint32(zoneId) + self.send(dg) + def setOwner(self, doId, newOwner): """ Sets the owner of a DistributedObject. This will enable the new owner to send "ownsend" fields,