mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
minor changes
This commit is contained in:
parent
5e65b52f3a
commit
e647dd72d7
@ -58,7 +58,7 @@ transmit_data(const DataNodeTransmit inputs[],
|
|||||||
new_input.set_data(connect._input_index, data);
|
new_input.set_data(connect._input_index, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (dgraph_cat.is_spam()) {
|
if (dgraph_cat.is_spam()) {
|
||||||
bool any_data = false;
|
bool any_data = false;
|
||||||
Wires::const_iterator wi;
|
Wires::const_iterator wi;
|
||||||
@ -77,11 +77,11 @@ transmit_data(const DataNodeTransmit inputs[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // NDEBUG
|
#endif // NDEBUG
|
||||||
|
|
||||||
do_transmit_data(new_input, output);
|
do_transmit_data(new_input, output);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (dgraph_cat.is_spam()) {
|
if (dgraph_cat.is_spam()) {
|
||||||
bool any_data = false;
|
bool any_data = false;
|
||||||
Wires::const_iterator wi;
|
Wires::const_iterator wi;
|
||||||
@ -100,7 +100,7 @@ transmit_data(const DataNodeTransmit inputs[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // NDEBUG
|
#endif // NDEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -144,7 +144,7 @@ void Physical::
|
|||||||
write_physics_objects(ostream &out, unsigned int indent) const {
|
write_physics_objects(ostream &out, unsigned int indent) const {
|
||||||
#ifndef NDEBUG //[
|
#ifndef NDEBUG //[
|
||||||
out.width(indent);
|
out.width(indent);
|
||||||
out<<""<<"_physics_objects\n";
|
out<<""<<"_physics_objects ("<<_physics_objects.size()<<" forces)\n";
|
||||||
for (PhysicsObjectVector::const_iterator i=_physics_objects.begin();
|
for (PhysicsObjectVector::const_iterator i=_physics_objects.begin();
|
||||||
i != _physics_objects.end();
|
i != _physics_objects.end();
|
||||||
++i) {
|
++i) {
|
||||||
@ -163,7 +163,7 @@ void Physical::
|
|||||||
write_linear_forces(ostream &out, unsigned int indent) const {
|
write_linear_forces(ostream &out, unsigned int indent) const {
|
||||||
#ifndef NDEBUG //[
|
#ifndef NDEBUG //[
|
||||||
out.width(indent);
|
out.width(indent);
|
||||||
out<<""<<"_linear_forces\n";
|
out<<""<<"_linear_forces ("<<_linear_forces.size()<<" forces)\n";
|
||||||
for (LinearForceVector::const_iterator i=_linear_forces.begin();
|
for (LinearForceVector::const_iterator i=_linear_forces.begin();
|
||||||
i != _linear_forces.end();
|
i != _linear_forces.end();
|
||||||
++i) {
|
++i) {
|
||||||
@ -182,7 +182,7 @@ void Physical::
|
|||||||
write_angular_forces(ostream &out, unsigned int indent) const {
|
write_angular_forces(ostream &out, unsigned int indent) const {
|
||||||
#ifndef NDEBUG //[
|
#ifndef NDEBUG //[
|
||||||
out.width(indent);
|
out.width(indent);
|
||||||
out<<""<<"_angular_forces\n";
|
out<<""<<"_angular_forces ("<<_angular_forces.size()<<" forces)\n";
|
||||||
for (AngularForceVector::const_iterator i=_angular_forces.begin();
|
for (AngularForceVector::const_iterator i=_angular_forces.begin();
|
||||||
i != _angular_forces.end();
|
i != _angular_forces.end();
|
||||||
++i) {
|
++i) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef BUTTONHANDLE_H
|
#ifndef BUTTONHANDLE_H
|
||||||
#define BUTTONHANDLE_H
|
#define BUTTONHANDLE_H
|
||||||
|
|
||||||
#include <pandabase.h>
|
#include "pandabase.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Class : ButtonHandle
|
// Class : ButtonHandle
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef BUTTONREGISTRY_H
|
#ifndef BUTTONREGISTRY_H
|
||||||
#define BUTTONREGISTRY_H
|
#define BUTTONREGISTRY_H
|
||||||
|
|
||||||
#include <pandabase.h>
|
#include "pandabase.h"
|
||||||
|
|
||||||
#include "buttonHandle.h"
|
#include "buttonHandle.h"
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ KeyHeld() {
|
|||||||
float DriveInterface::KeyHeld::
|
float DriveInterface::KeyHeld::
|
||||||
get_effect(float ramp_up_time, float ramp_down_time) {
|
get_effect(float ramp_up_time, float ramp_down_time) {
|
||||||
double elapsed = ClockObject::get_global_clock()->get_frame_time() - _changed_time;
|
double elapsed = ClockObject::get_global_clock()->get_frame_time() - _changed_time;
|
||||||
|
|
||||||
if (_down) {
|
if (_down) {
|
||||||
// We are currently holding down the key. That means we base our
|
// We are currently holding down the key. That means we base our
|
||||||
// effect on the ramp_up_time.
|
// 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;
|
float change = elapsed / ramp_up_time;
|
||||||
_effect = min(_effect_at_change + change, 1.0f);
|
_effect = min(_effect_at_change + change, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// We are *not* currently holding down the key. That means we
|
// We are *not* currently holding down the key. That means we
|
||||||
// base our effect on the ramp_down_time.
|
// 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);
|
_effect = max(_effect_at_change - change, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _effect;
|
return _effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +239,6 @@ force_dgraph() {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void DriveInterface::
|
void DriveInterface::
|
||||||
apply(double x, double y, bool any_button) {
|
apply(double x, double y, bool any_button) {
|
||||||
|
|
||||||
// First reset the speeds
|
// First reset the speeds
|
||||||
_speed = 0.0f;
|
_speed = 0.0f;
|
||||||
_rot_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
|
// Now, what's our rotational velocity? This is based on the
|
||||||
// mouse's horizontal position.
|
// mouse's horizontal position.
|
||||||
|
|
||||||
float dead_zone_right = _horizontal_center + _horizontal_dead_zone;
|
float dead_zone_right = _horizontal_center + _horizontal_dead_zone;
|
||||||
float dead_zone_left = _horizontal_center - _horizontal_dead_zone;
|
float dead_zone_left = _horizontal_center - _horizontal_dead_zone;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user