Explorar o código

*** empty log message ***

Dave Schuyler %!s(int64=22) %!d(string=hai) anos
pai
achega
1dd6700ef7
Modificáronse 2 ficheiros con 3 adicións e 8 borrados
  1. 0 8
      direct/src/showbase/GravityWalker.py
  2. 3 0
      direct/src/showbase/InputState.py

+ 0 - 8
direct/src/showbase/GravityWalker.py

@@ -314,7 +314,6 @@ class GravityWalker(DirectObject.DirectObject):
         turnRight = inputState.isSet("turnRight")
         slide = 0 #hack -- was: inputState.isSet("slide")
         jump = inputState.isSet("jump")
-        pie = inputState.isSet("pie")
         # Determine what the speeds are based on the buttons:
         self.speed=(forward and self.avatarControlForwardSpeed or 
                     reverse and -self.avatarControlReverseSpeed)
@@ -326,13 +325,6 @@ class GravityWalker(DirectObject.DirectObject):
                 (turnLeft and self.avatarControlRotateSpeed) or
                 (turnRight and -self.avatarControlRotateSpeed))
 
-        # No moving allowed while throwing a pie.
-        if pie:
-            self.speed = 0
-            self.slideSpeed = 0
-            self.rotationSpeed = 0
-            jump = 0
-
         if self.wantDebugIndicator:
             onScreenDebug.add("airborneHeight", self.lifter.getAirborneHeight()) #*#
             onScreenDebug.add("falling", self.falling) #*#

+ 3 - 0
direct/src/showbase/InputState.py

@@ -73,6 +73,9 @@ class InputState(DirectObject.DirectObject):
     def set(self, name, isSet):
         assert(self.debugPrint("set(name=%s, isSet=%s)"%(name, isSet)))
         self.state[name] = isSet
+        # We change the name befor sending it because this may
+        # be the same name that messenger used to call InputState.set()
+        # this avoids running in circles:
         messenger.send("InputState-%s"%(name,), [isSet])
     
     def isSet(self, name):