diff --git a/direct/src/showbase/GravityWalker.py b/direct/src/showbase/GravityWalker.py index c0c4b1624a..64ff742286 100755 --- a/direct/src/showbase/GravityWalker.py +++ b/direct/src/showbase/GravityWalker.py @@ -270,8 +270,7 @@ class GravityWalker(DirectObject.DirectObject): as floor, but are nearly vertical. This ray is a hack to help deal with the cliff. """ - if (base.isRendering - and self.collisionsActive + if (self.collisionsActive and self.moving and self.lifter.isInOuterSpace()): temp = self.cRayNodePath.getZ() diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 0a07964b88..c583421bb5 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -66,12 +66,6 @@ class ShowBase(DirectObject.DirectObject): # Fill this in with a function to invoke when the user "exits" # the program by closing the main window. self.exitFunc = None - - # There are times when we are not drawing anything new to the - # screen, but we were grinding away on all the collision loops - # and shadow stuff and actually rendering. This is to test - # not doing some of that: - self.isRendering = 1 taskMgr.taskTimerVerbose = self.config.GetBool('task-timer-verbose', 0) taskMgr.extendedExceptions = self.config.GetBool('extended-exceptions', 0) @@ -837,37 +831,34 @@ class ShowBase(DirectObject.DirectObject): def shadowCollisionLoop(self, state): # run the collision traversal if we have a # CollisionTraverser set. - if self.isRendering: - if self.shadowTrav: - self.shadowTrav.traverse(self.render) + if self.shadowTrav: + self.shadowTrav.traverse(self.render) return Task.cont def collisionloop(self, state): # run the collision traversal if we have a # CollisionTraverser set. - if self.isRendering: - if self.cTrav: - self.cTrav.traverse(self.render) - if self.appTrav: - self.appTrav.traverse(self.render) + if self.cTrav: + self.cTrav.traverse(self.render) + if self.appTrav: + self.appTrav.traverse(self.render) return Task.cont def igloop(self, state): - if self.isRendering: - if __debug__: - # We render the watch variables for the onScreenDebug as soon - # as we reasonably can before the renderFrame(). - onScreenDebug.render() + if __debug__: + # We render the watch variables for the onScreenDebug as soon + # as we reasonably can before the renderFrame(). + onScreenDebug.render() - # Finally, render the frame. - self.graphicsEngine.renderFrame() - if self.clusterSyncFlag: - self.graphicsEngine.syncFrame() + # Finally, render the frame. + self.graphicsEngine.renderFrame() + if self.clusterSyncFlag: + self.graphicsEngine.syncFrame() - if __debug__: - # We clear the text buffer for the onScreenDebug as soon - # as we reasonably can after the renderFrame(). - onScreenDebug.clear() + if __debug__: + # We clear the text buffer for the onScreenDebug as soon + # as we reasonably can after the renderFrame(). + onScreenDebug.clear() if self.mainWinMinimized: # If the main window is minimized, slow down the app a bit @@ -885,10 +876,6 @@ class ShowBase(DirectObject.DirectObject): throwNewFrame() return Task.cont - def setRendering(self, isRendering): - self.isRendering = isRendering - print "** base.isRendering=%s **"%isRendering - def restart(self): self.shutdown() # resetPrevTransform goes at the very beginning of the frame.