diff --git a/direct/src/distributed/DistributedObjectAI.py b/direct/src/distributed/DistributedObjectAI.py index 1eefd64d05..510726686e 100644 --- a/direct/src/distributed/DistributedObjectAI.py +++ b/direct/src/distributed/DistributedObjectAI.py @@ -331,6 +331,9 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns): def GetPuppetConnectionChannel(self, doId): return doId + (1L << 32) + def GetAccountConnectionChannel(self, doId): + return doId + (3L << 32) + def GetAccountIDFromChannelCode(self, channel): return channel >> 32 @@ -342,6 +345,11 @@ class DistributedObjectAI(DistributedObjectBase, EnforcesCalldowns): channelId = self.GetPuppetConnectionChannel(avId) self.sendUpdateToChannel(channelId, fieldName, args) + def sendUpdateToAccountId(self, accountId, fieldName, args): + assert self.notify.debugStateCall(self) + channelId = self.GetAccountConnectionChannel(accountId) + self.sendUpdateToChannel(channelId, fieldName, args) + def sendUpdateToChannel(self, channelId, fieldName, args): assert self.notify.debugStateCall(self) if self.air: diff --git a/direct/src/distributed/DistributedObjectUD.py b/direct/src/distributed/DistributedObjectUD.py index 252c7b6527..ac436f7001 100755 --- a/direct/src/distributed/DistributedObjectUD.py +++ b/direct/src/distributed/DistributedObjectUD.py @@ -262,6 +262,9 @@ class DistributedObjectUD(DistributedObjectBase): def GetPuppetConnectionChannel(self, doId): return doId + (1L << 32) + def GetAccountConnectionChannel(self, doId): + return doId + (3L << 32) + def GetAccountIDFromChannelCode(self, channel): return channel >> 32 @@ -273,6 +276,11 @@ class DistributedObjectUD(DistributedObjectBase): channelId = self.GetPuppetConnectionChannel(avId) self.sendUpdateToChannel(channelId, fieldName, args) + def sendUpdateToAccountId(self, accountId, fieldName, args): + assert self.notify.debugStateCall(self) + channelId = self.GetAccountConnectionChannel(accountId) + self.sendUpdateToChannel(channelId, fieldName, args) + def sendUpdateToChannel(self, channelId, fieldName, args): assert self.notify.debugStateCall(self) if self.air: