From 2d3afd2dcc65fb55a060b2607109eb4ffa65711d Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Sat, 4 Sep 2004 00:53:27 +0000 Subject: [PATCH] fixed dolater sorting --- direct/src/task/Task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/src/task/Task.py b/direct/src/task/Task.py index 1914327c6b..8aaf8877ff 100644 --- a/direct/src/task/Task.py +++ b/direct/src/task/Task.py @@ -854,7 +854,7 @@ class TaskManager: # The priority heap is not actually in order - it is a tree # Make a shallow copy so we can sort it sortedDoLaterList = self.__doLaterList[:] - sortedDoLaterList.sort() + sortedDoLaterList.sort(lambda a,b: cmp(a.getWakeTime(), b.getWakeTime())) sortedDoLaterList.reverse() for task in sortedDoLaterList: remainingTime = ((task.getWakeTime()) - self.currentTime)