Browse Source

add pushers-horizontal and make the initial default for CollisionHandlerPusher::set_horizontal() be false.

David Rose 14 years ago
parent
commit
ffa6d1bf16

+ 1 - 1
panda/src/collide/collisionHandlerPusher.cxx

@@ -43,7 +43,7 @@ public:
 ////////////////////////////////////////////////////////////////////
 CollisionHandlerPusher::
 CollisionHandlerPusher() {
-  _horizontal = true;
+  _horizontal = pushers_horizontal;
 }
 
 ////////////////////////////////////////////////////////////////////

+ 6 - 0
panda/src/collide/config_collide.cxx

@@ -102,6 +102,12 @@ ConfigVariableInt fluid_cap_amount
 ("fluid-cap-amount", 100,
  PRC_DESC("ensures that fluid pos doesn't check beyond X feet"));
 
+ConfigVariableBool pushers_horizontal
+("pushers-horizontal", false,
+ PRC_DESC("Set this true to make all CollisionHandlerPushers have the "
+          "set_horizontal() flag by default, false to let the move "
+          "in three dimensions by default."));
+
 ////////////////////////////////////////////////////////////////////
 //     Function: init_libcollide
 //  Description: Initializes the library.  This must be called at

+ 1 - 0
panda/src/collide/config_collide.h

@@ -30,6 +30,7 @@ extern EXPCL_PANDA_COLLIDE ConfigVariableBool flatten_collision_nodes;
 extern EXPCL_PANDA_COLLIDE ConfigVariableDouble collision_parabola_bounds_threshold;
 extern EXPCL_PANDA_COLLIDE ConfigVariableInt collision_parabola_bounds_sample;
 extern EXPCL_PANDA_COLLIDE ConfigVariableInt fluid_cap_amount;
+extern EXPCL_PANDA_COLLIDE ConfigVariableBool pushers_horizontal;
 
 extern EXPCL_PANDA_COLLIDE void init_libcollide();