Browse Source

added want-demo-hacks

Samir Naik 19 years ago
parent
commit
ff4eba0179
1 changed files with 4 additions and 3 deletions
  1. 4 3
      direct/src/controls/PhysicsWalker.py

+ 4 - 3
direct/src/controls/PhysicsWalker.py

@@ -29,7 +29,8 @@ class PhysicsWalker(DirectObject.DirectObject):
     notify = DirectNotifyGlobal.directNotify.newCategory("PhysicsWalker")
     notify = DirectNotifyGlobal.directNotify.newCategory("PhysicsWalker")
     wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
     wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
     wantAvatarPhysicsIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
     wantAvatarPhysicsIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
-
+    wantDemoHacks = base.config.GetBool('want-demo-hacks', 0)
+    
     useLifter = 0
     useLifter = 0
     useHeightRay = 0
     useHeightRay = 0
 
 
@@ -739,7 +740,7 @@ class PhysicsWalker(DirectObject.DirectObject):
         assert self.debugPrint("enableAvatarControls()")
         assert self.debugPrint("enableAvatarControls()")
         assert self.collisionsActive
         assert self.collisionsActive
 
 
-        if __debug__:
+        if __debug__ or self.wantDemoHacks:
             #self.accept("control-f3", self.spawnTest) #*#
             #self.accept("control-f3", self.spawnTest) #*#
             self.accept("f3", self.reset) # for debugging only.
             self.accept("f3", self.reset) # for debugging only.
 
 
@@ -762,7 +763,7 @@ class PhysicsWalker(DirectObject.DirectObject):
         taskName = "AvatarControlsIndicator%s"%(id(self),)
         taskName = "AvatarControlsIndicator%s"%(id(self),)
         taskMgr.remove(taskName)
         taskMgr.remove(taskName)
 
 
-        if __debug__:
+        if __debug__ or self.wantDemoHacks:
             self.ignore("control-f3") #*#
             self.ignore("control-f3") #*#
             self.ignore("f3")
             self.ignore("f3")