mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
as per darren, a better fix
This commit is contained in:
parent
24b0ce64e2
commit
464802e722
@ -4,10 +4,11 @@ from ClockDelta import *
|
|||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
from direct.showbase.PythonUtil import randFloat, Enum
|
from direct.showbase.PythonUtil import randFloat, Enum
|
||||||
|
|
||||||
class DummyTask:
|
class DummyTaskClass:
|
||||||
def setDelay(self, blah):
|
def setDelay(self, blah):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
DummyTask = DummyTaskClass()
|
||||||
|
|
||||||
class DistributedSmoothNodeBase:
|
class DistributedSmoothNodeBase:
|
||||||
"""common base class for DistributedSmoothNode and DistributedSmoothNodeAI
|
"""common base class for DistributedSmoothNode and DistributedSmoothNodeAI
|
||||||
@ -98,12 +99,10 @@ class DistributedSmoothNodeBase:
|
|||||||
taskMgr.doMethodLater(self.__broadcastPeriod + delay,
|
taskMgr.doMethodLater(self.__broadcastPeriod + delay,
|
||||||
self._posHprBroadcast, taskName)
|
self._posHprBroadcast, taskName)
|
||||||
|
|
||||||
def _posHprBroadcast(self, task=None):
|
def _posHprBroadcast(self, task=DummyTask):
|
||||||
# TODO: we explicitly stagger the initial task timing in
|
# TODO: we explicitly stagger the initial task timing in
|
||||||
# startPosHprBroadcast; we should at least make an effort to keep
|
# startPosHprBroadcast; we should at least make an effort to keep
|
||||||
# this task accurately aligned with its period and starting time.
|
# this task accurately aligned with its period and starting time.
|
||||||
if task is None:
|
|
||||||
task = DummyTask()
|
|
||||||
self.d_broadcastPosHpr()
|
self.d_broadcastPosHpr()
|
||||||
task.setDelay(self.__broadcastPeriod)
|
task.setDelay(self.__broadcastPeriod)
|
||||||
return Task.again
|
return Task.again
|
||||||
|
Loading…
x
Reference in New Issue
Block a user