瀏覽代碼

changed several task priorities.

Dave Schuyler 22 年之前
父節點
當前提交
e4b9210235
共有 3 個文件被更改,包括 6 次插入7 次删除
  1. 2 2
      direct/src/showbase/PhysicsWalker.py
  2. 3 3
      direct/src/showbase/ShowBase.py
  3. 1 2
      direct/src/task/Task.py

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

@@ -349,9 +349,9 @@ class PhysicsWalker(DirectObject.DirectObject):
         # remove any old
         taskMgr.remove(taskName)
         # spawn the new task
-        taskMgr.add(self.handleAvatarControls, taskName)
+        taskMgr.add(self.handleAvatarControls, taskName, 10)
         if self.physVelocityIndicator:
-            taskMgr.add(self.avatarPhysicsIndicator, "AvatarControlsIndicator%s"%(id(self),), 47)
+            taskMgr.add(self.avatarPhysicsIndicator, "AvatarControlsIndicator%s"%(id(self),), 35)
 
     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,
         # so that it will get run after most tasks
         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
         # 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,
         # so that it will get run before most tasks
         self.taskMgr.add(self.dataloop, 'dataloop', priority = -50)
         # spawn the ivalloop with a later priority, so that it will
         # 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()
 
     def shutdown(self):

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

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