mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
changed updateGridTask so it is not required to pass a task param
This commit is contained in:
parent
879329de0e
commit
491d9a08b4
@ -87,7 +87,7 @@ class DistributedCartesianGridAI(DistributedNodeAI.DistributedNodeAI,
|
||||
taskMgr.remove(self.taskName("updateGridTask"))
|
||||
self.updateTaskStarted = 0
|
||||
|
||||
def updateGridTask(self, task):
|
||||
def updateGridTask(self, task=None):
|
||||
# Run through all grid objects and update their parents if needed
|
||||
for avId in self.gridObjects:
|
||||
av = self.gridObjects[avId]
|
||||
@ -97,7 +97,8 @@ class DistributedCartesianGridAI(DistributedNodeAI.DistributedNodeAI,
|
||||
# we are out of the bounds of this current cell
|
||||
self.handleAvatarZoneChange(av)
|
||||
# Do this every second, not every frame
|
||||
task.delayTime = 1.0
|
||||
if (task):
|
||||
task.delayTime = 1.0
|
||||
return Task.again
|
||||
|
||||
def handleAvatarZoneChange(self, av, useZoneId=-1):
|
||||
|
Loading…
x
Reference in New Issue
Block a user