mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -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"))
|
taskMgr.remove(self.taskName("updateGridTask"))
|
||||||
self.updateTaskStarted = 0
|
self.updateTaskStarted = 0
|
||||||
|
|
||||||
def updateGridTask(self, task):
|
def updateGridTask(self, task=None):
|
||||||
# Run through all grid objects and update their parents if needed
|
# Run through all grid objects and update their parents if needed
|
||||||
for avId in self.gridObjects:
|
for avId in self.gridObjects:
|
||||||
av = self.gridObjects[avId]
|
av = self.gridObjects[avId]
|
||||||
@ -97,7 +97,8 @@ class DistributedCartesianGridAI(DistributedNodeAI.DistributedNodeAI,
|
|||||||
# we are out of the bounds of this current cell
|
# we are out of the bounds of this current cell
|
||||||
self.handleAvatarZoneChange(av)
|
self.handleAvatarZoneChange(av)
|
||||||
# Do this every second, not every frame
|
# Do this every second, not every frame
|
||||||
task.delayTime = 1.0
|
if (task):
|
||||||
|
task.delayTime = 1.0
|
||||||
return Task.again
|
return Task.again
|
||||||
|
|
||||||
def handleAvatarZoneChange(self, av, useZoneId=-1):
|
def handleAvatarZoneChange(self, av, useZoneId=-1):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user