From 3a528ca0a48003300bc527985f00d782a6c8199b Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Tue, 21 Sep 2004 01:36:27 +0000 Subject: [PATCH] capped runaway Doodle bandwidth usage --- direct/src/distributed/DistributedSmoothNodeBase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direct/src/distributed/DistributedSmoothNodeBase.py b/direct/src/distributed/DistributedSmoothNodeBase.py index 33a7bf8c2a..676778457e 100755 --- a/direct/src/distributed/DistributedSmoothNodeBase.py +++ b/direct/src/distributed/DistributedSmoothNodeBase.py @@ -29,6 +29,10 @@ class DistributedSmoothNodeBase: # presumably, we have a doId at this point return "sendPosHpr-%s" % self.doId + def setPosHprBroadcastPeriod(self, period): + # call this at any time to change the delay between broadcasts + self.__broadcastPeriod = period + def stopPosHprBroadcast(self): taskMgr.remove(self.getPosHprBroadcastTaskName()) # Delete this callback because it maintains a reference to self @@ -58,7 +62,7 @@ class DistributedSmoothNodeBase: # Set up telemetry optimization variables self.cnode.initialize(self, self.dclass, self.doId) - self.__broadcastPeriod = period + self.setPosHprBroadcastPeriod(period) # Broadcast our initial position self.b_clearSmoothing() self.cnode.sendEverything()