From 9b1ae61632a0bd5fc670196ec147645cb80aee69 Mon Sep 17 00:00:00 2001 From: bobbybee Date: Thu, 14 Aug 2014 21:06:36 -0400 Subject: [PATCH] Stateserver set owner --- direct/src/distributed/AstronInternalRepository.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/direct/src/distributed/AstronInternalRepository.py b/direct/src/distributed/AstronInternalRepository.py index 496392ebf0..e18f7e3dad 100644 --- a/direct/src/distributed/AstronInternalRepository.py +++ b/direct/src/distributed/AstronInternalRepository.py @@ -433,7 +433,7 @@ class AstronInternalRepository(ConnectionRepository): dg.add_uint64(aiChannel) self.send(dg) - def eject(self, clientChannel, reasonCode, reason): + def eject(self, clientChannel, reasonCode, reason): """ Kicks the client residing at the specified clientChannel, using the specifed reasoning. """ @@ -465,4 +465,15 @@ class AstronInternalRepository(ConnectionRepository): dg = PyDatagram() dg.addServerHeader(clientChannel, self.ourChannel, CLIENTAGENT_ADD_SESSION_OBJECT) dg.add_uint32(doId) + self.send(dg) + + def setOwner(self, doId, newOwner): + """ + Sets the owner of a DistributedObject. This will enable the new owner to send "ownsend" fields, + and will generate an OwnerView. + """ + + dg = PyDatagram() + dg.addServerHeader(doId, self.ourChannel, STATESERVER_OBJECT_SET_OWNER) + dg.add_uint64(newOwner) self.send(dg) \ No newline at end of file