From 464802e722225da1d482531573ebd1830cc46c24 Mon Sep 17 00:00:00 2001 From: "Asad M. Zaman" Date: Fri, 19 Sep 2008 23:52:07 +0000 Subject: [PATCH] as per darren, a better fix --- direct/src/distributed/DistributedSmoothNodeBase.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/direct/src/distributed/DistributedSmoothNodeBase.py b/direct/src/distributed/DistributedSmoothNodeBase.py index 6181ec1d7f..6eae16b8c6 100755 --- a/direct/src/distributed/DistributedSmoothNodeBase.py +++ b/direct/src/distributed/DistributedSmoothNodeBase.py @@ -4,10 +4,11 @@ from ClockDelta import * from direct.task import Task from direct.showbase.PythonUtil import randFloat, Enum -class DummyTask: +class DummyTaskClass: def setDelay(self, blah): pass +DummyTask = DummyTaskClass() class DistributedSmoothNodeBase: """common base class for DistributedSmoothNode and DistributedSmoothNodeAI @@ -98,12 +99,10 @@ class DistributedSmoothNodeBase: taskMgr.doMethodLater(self.__broadcastPeriod + delay, self._posHprBroadcast, taskName) - def _posHprBroadcast(self, task=None): + def _posHprBroadcast(self, task=DummyTask): # TODO: we explicitly stagger the initial task timing in # startPosHprBroadcast; we should at least make an effort to keep # this task accurately aligned with its period and starting time. - if task is None: - task = DummyTask() self.d_broadcastPosHpr() task.setDelay(self.__broadcastPeriod) return Task.again