diff --git a/panda/src/dgraph/dataNode.cxx b/panda/src/dgraph/dataNode.cxx index ffd4d6a71c..4cf7af6eb6 100644 --- a/panda/src/dgraph/dataNode.cxx +++ b/panda/src/dgraph/dataNode.cxx @@ -58,7 +58,7 @@ transmit_data(const DataNodeTransmit inputs[], new_input.set_data(connect._input_index, data); } -#ifndef NDEBUG + #ifndef NDEBUG if (dgraph_cat.is_spam()) { bool any_data = false; Wires::const_iterator wi; @@ -77,11 +77,11 @@ transmit_data(const DataNodeTransmit inputs[], } } } -#endif // NDEBUG + #endif // NDEBUG do_transmit_data(new_input, output); -#ifndef NDEBUG + #ifndef NDEBUG if (dgraph_cat.is_spam()) { bool any_data = false; Wires::const_iterator wi; @@ -100,7 +100,7 @@ transmit_data(const DataNodeTransmit inputs[], } } } -#endif // NDEBUG + #endif // NDEBUG } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/physics/physical.cxx b/panda/src/physics/physical.cxx index 132424221a..6f59959713 100644 --- a/panda/src/physics/physical.cxx +++ b/panda/src/physics/physical.cxx @@ -144,7 +144,7 @@ void Physical:: write_physics_objects(ostream &out, unsigned int indent) const { #ifndef NDEBUG //[ out.width(indent); - out<<""<<"_physics_objects\n"; + out<<""<<"_physics_objects ("<<_physics_objects.size()<<" forces)\n"; for (PhysicsObjectVector::const_iterator i=_physics_objects.begin(); i != _physics_objects.end(); ++i) { @@ -163,7 +163,7 @@ void Physical:: write_linear_forces(ostream &out, unsigned int indent) const { #ifndef NDEBUG //[ out.width(indent); - out<<""<<"_linear_forces\n"; + out<<""<<"_linear_forces ("<<_linear_forces.size()<<" forces)\n"; for (LinearForceVector::const_iterator i=_linear_forces.begin(); i != _linear_forces.end(); ++i) { @@ -182,7 +182,7 @@ void Physical:: write_angular_forces(ostream &out, unsigned int indent) const { #ifndef NDEBUG //[ out.width(indent); - out<<""<<"_angular_forces\n"; + out<<""<<"_angular_forces ("<<_angular_forces.size()<<" forces)\n"; for (AngularForceVector::const_iterator i=_angular_forces.begin(); i != _angular_forces.end(); ++i) { diff --git a/panda/src/putil/buttonHandle.h b/panda/src/putil/buttonHandle.h index 9d9478271a..62cc0bcd7c 100644 --- a/panda/src/putil/buttonHandle.h +++ b/panda/src/putil/buttonHandle.h @@ -19,7 +19,7 @@ #ifndef BUTTONHANDLE_H #define BUTTONHANDLE_H -#include +#include "pandabase.h" //////////////////////////////////////////////////////////////////// // Class : ButtonHandle diff --git a/panda/src/putil/buttonRegistry.h b/panda/src/putil/buttonRegistry.h index 50d4d7afbc..14c1998184 100644 --- a/panda/src/putil/buttonRegistry.h +++ b/panda/src/putil/buttonRegistry.h @@ -19,7 +19,7 @@ #ifndef BUTTONREGISTRY_H #define BUTTONREGISTRY_H -#include +#include "pandabase.h" #include "buttonHandle.h" diff --git a/panda/src/tform/driveInterface.cxx b/panda/src/tform/driveInterface.cxx index 017f72c7f8..b81f7f05ef 100644 --- a/panda/src/tform/driveInterface.cxx +++ b/panda/src/tform/driveInterface.cxx @@ -44,7 +44,6 @@ KeyHeld() { float DriveInterface::KeyHeld:: get_effect(float ramp_up_time, float ramp_down_time) { double elapsed = ClockObject::get_global_clock()->get_frame_time() - _changed_time; - if (_down) { // We are currently holding down the key. That means we base our // effect on the ramp_up_time. @@ -55,7 +54,6 @@ get_effect(float ramp_up_time, float ramp_down_time) { float change = elapsed / ramp_up_time; _effect = min(_effect_at_change + change, 1.0f); } - } else { // We are *not* currently holding down the key. That means we // base our effect on the ramp_down_time. @@ -67,7 +65,6 @@ get_effect(float ramp_up_time, float ramp_down_time) { _effect = max(_effect_at_change - change, 0.0f); } } - return _effect; } @@ -242,7 +239,6 @@ force_dgraph() { //////////////////////////////////////////////////////////////////// void DriveInterface:: apply(double x, double y, bool any_button) { - // First reset the speeds _speed = 0.0f; _rot_speed = 0.0f; @@ -280,7 +276,6 @@ apply(double x, double y, bool any_button) { // Now, what's our rotational velocity? This is based on the // mouse's horizontal position. - float dead_zone_right = _horizontal_center + _horizontal_dead_zone; float dead_zone_left = _horizontal_center - _horizontal_dead_zone;