Browse Source

formatting

Dave Schuyler 20 years ago
parent
commit
dbf7ac0bd8
2 changed files with 5 additions and 6 deletions
  1. 1 2
      direct/src/actor/Actor.py
  2. 4 4
      direct/src/controls/BattleWalker.py

+ 1 - 2
direct/src/actor/Actor.py

@@ -1092,7 +1092,7 @@ class Actor(DirectObject, NodePath):
         """
         """
         animControlDict = self.__animControlDict.get(lodName)
         animControlDict = self.__animControlDict.get(lodName)
         # if this assertion fails, named lod was not present
         # if this assertion fails, named lod was not present
-        assert(animControlDict != None)
+        assert animControlDict != None
 
 
         animDict = animControlDict.get(partName)
         animDict = animControlDict.get(partName)
         if animDict == None:
         if animDict == None:
@@ -1212,7 +1212,6 @@ class Actor(DirectObject, NodePath):
             Actor.notify.warning("%s is not a character!" % (modelPath))
             Actor.notify.warning("%s is not a character!" % (modelPath))
             model.reparentTo(self.__geomNode)
             model.reparentTo(self.__geomNode)
         else:
         else:
-
             # Maybe the model file also included some animations.  If
             # Maybe the model file also included some animations.  If
             # so, try to bind them immediately and put them into the
             # so, try to bind them immediately and put them into the
             # animControlDict.
             # animControlDict.

+ 4 - 4
direct/src/controls/BattleWalker.py

@@ -59,7 +59,7 @@ class BattleWalker(GravityWalker.GravityWalker):
         if self.lifter.isOnGround():
         if self.lifter.isOnGround():
             if self.isAirborne:
             if self.isAirborne:
                 self.isAirborne = 0
                 self.isAirborne = 0
-                assert(self.debugPrint("isAirborne 0 due to isOnGround() true"))
+                assert self.debugPrint("isAirborne 0 due to isOnGround() true")
                 impact = self.lifter.getImpactVelocity()
                 impact = self.lifter.getImpactVelocity()
                 if impact < -30.0:
                 if impact < -30.0:
                     messenger.send("jumpHardLand")
                     messenger.send("jumpHardLand")
@@ -69,7 +69,7 @@ class BattleWalker(GravityWalker.GravityWalker):
                     if impact < -5.0:
                     if impact < -5.0:
                         self.startJumpDelay(0.2)
                         self.startJumpDelay(0.2)
                     # else, ignore the little potholes.
                     # else, ignore the little potholes.
-            assert(self.isAirborne == 0)
+            assert self.isAirborne == 0
             self.priorParent = Vec3.zero()
             self.priorParent = Vec3.zero()
             if jump and self.mayJump:
             if jump and self.mayJump:
                 # The jump button is down and we're close
                 # The jump button is down and we're close
@@ -77,10 +77,10 @@ class BattleWalker(GravityWalker.GravityWalker):
                 self.lifter.addVelocity(self.avatarControlJumpForce)
                 self.lifter.addVelocity(self.avatarControlJumpForce)
                 messenger.send("jumpStart")
                 messenger.send("jumpStart")
                 self.isAirborne = 1
                 self.isAirborne = 1
-                assert(self.debugPrint("isAirborne 1 due to jump"))
+                assert self.debugPrint("isAirborne 1 due to jump")
         else:
         else:
             if self.isAirborne == 0:
             if self.isAirborne == 0:
-                assert(self.debugPrint("isAirborne 1 due to isOnGround() false"))
+                assert self.debugPrint("isAirborne 1 due to isOnGround() false")
             self.isAirborne = 1
             self.isAirborne = 1
 
 
         self.__oldPosDelta = self.avatarNodePath.getPosDelta(render)
         self.__oldPosDelta = self.avatarNodePath.getPosDelta(render)