diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-27 01:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 01:05:18 +0200 |
commit | eaaff9da3178fa515a0f051fda932c1dd04d53db (patch) | |
tree | 56173535c376e0324f89baccf4bc14b2580ead23 /scene/3d/vehicle_body.cpp | |
parent | d8c96461183f0dc3208c3d624674fa4544212ea5 (diff) | |
parent | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (diff) | |
download | redot-engine-eaaff9da3178fa515a0f051fda932c1dd04d53db.tar.gz |
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
Diffstat (limited to 'scene/3d/vehicle_body.cpp')
-rw-r--r-- | scene/3d/vehicle_body.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 55bb7eabd9..89e96e0227 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -723,7 +723,7 @@ void VehicleBody::_update_friction(PhysicsDirectBodyState *s) { real_t rollingFriction = 0.f; if (wheelInfo.m_raycastInfo.m_isInContact) { - if (engine_force != 0.f && wheelInfo.engine_traction != false) { + if (engine_force != 0.f && wheelInfo.engine_traction) { rollingFriction = -engine_force * s->get_step(); } else { real_t defaultRollingFrictionImpulse = 0.f; @@ -928,8 +928,7 @@ void VehicleBody::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); } -VehicleBody::VehicleBody() : - RigidBody() { +VehicleBody::VehicleBody() { m_pitchControl = 0; m_currentVehicleSpeedKmHour = real_t(0.); |