Browse Source

changed several task priorities.

Dave Schuyler 22 years ago
parent
commit
e4b9210235

+ 2 - 2
direct/src/showbase/PhysicsWalker.py

@@ -349,9 +349,9 @@ class PhysicsWalker(DirectObject.DirectObject):
         # remove any old
         # remove any old
         taskMgr.remove(taskName)
         taskMgr.remove(taskName)
         # spawn the new task
         # spawn the new task
-        taskMgr.add(self.handleAvatarControls, taskName)
+        taskMgr.add(self.handleAvatarControls, taskName, 10)
         if self.physVelocityIndicator:
         if self.physVelocityIndicator:
-            taskMgr.add(self.avatarPhysicsIndicator, "AvatarControlsIndicator%s"%(id(self),), 47)
+            taskMgr.add(self.avatarPhysicsIndicator, "AvatarControlsIndicator%s"%(id(self),), 35)
 
 
     def disableAvatarControls(self):
     def disableAvatarControls(self):
         """
         """

+ 3 - 3
direct/src/showbase/ShowBase.py

@@ -838,16 +838,16 @@ class ShowBase(DirectObject.DirectObject):
         # give the igloop task a reasonably "late" priority,
         # give the igloop task a reasonably "late" priority,
         # so that it will get run after most tasks
         # so that it will get run after most tasks
         self.taskMgr.add(self.igloop, 'igloop', priority = 50)
         self.taskMgr.add(self.igloop, 'igloop', priority = 50)
-        # make the collisionloop task run shortly before igloop,
+        # make the collisionloop task run before igloop,
         # but leave enough room for the app to insert tasks
         # but leave enough room for the app to insert tasks
         # between collisionloop and igloop
         # between collisionloop and igloop
-        self.taskMgr.add(self.collisionloop, 'collisionloop', priority = 45)
+        self.taskMgr.add(self.collisionloop, 'collisionloop', priority = 30)
         # give the dataloop task a reasonably "early" priority,
         # give the dataloop task a reasonably "early" priority,
         # so that it will get run before most tasks
         # so that it will get run before most tasks
         self.taskMgr.add(self.dataloop, 'dataloop', priority = -50)
         self.taskMgr.add(self.dataloop, 'dataloop', priority = -50)
         # spawn the ivalloop with a later priority, so that it will
         # spawn the ivalloop with a later priority, so that it will
         # run after most tasks, but before igloop.
         # run after most tasks, but before igloop.
-        self.taskMgr.add(self.ivalloop, 'ivalloop', priority = 10)
+        self.taskMgr.add(self.ivalloop, 'ivalloop', priority = 20)
         self.eventMgr.restart()
         self.eventMgr.restart()
 
 
     def shutdown(self):
     def shutdown(self):

+ 1 - 2
direct/src/task/Task.py

@@ -339,7 +339,7 @@ class TaskManager:
         self.fVerbose = 0
         self.fVerbose = 0
         # Dictionary of task name to list of tasks with that name
         # Dictionary of task name to list of tasks with that name
         self.nameDict = {}
         self.nameDict = {}
-        self.add(self.__doLaterProcessor, "doLaterProcessor")
+        self.add(self.__doLaterProcessor, "doLaterProcessor", -10)
 
 
     def stepping(self, value):
     def stepping(self, value):
         self.stepping = value
         self.stepping = value
@@ -548,7 +548,6 @@ class TaskManager:
 
 
         Removes tasks whose names match the pattern, which can include
         Removes tasks whose names match the pattern, which can include
         standard shell globbing characters like *, ?, and [].
         standard shell globbing characters like *, ?, and [].
-
         """
         """
         if TaskManager.notify.getDebug():
         if TaskManager.notify.getDebug():
             TaskManager.notify.debug('removing tasks matching: ' + taskPattern)
             TaskManager.notify.debug('removing tasks matching: ' + taskPattern)