summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/audio_stream_player_3d.cpp6
-rw-r--r--scene/3d/camera.h2
-rw-r--r--scene/3d/cpu_particles.h2
-rw-r--r--scene/3d/soft_body.cpp1
-rw-r--r--scene/3d/vehicle_body.cpp5
-rw-r--r--scene/3d/voxel_light_baker.cpp4
6 files changed, 8 insertions, 12 deletions
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index ff8c218575..ff28f60d4f 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -93,7 +93,7 @@ void AudioStreamPlayer3D::_mix_audio() {
}
bool interpolate_filter = !started;
- ;
+
if (!found) {
//create new if was not used before
if (prev_output_count < MAX_OUTPUTS) {
@@ -872,8 +872,8 @@ void AudioStreamPlayer3D::set_stream_paused(bool p_pause) {
if (p_pause != stream_paused) {
stream_paused = p_pause;
- stream_paused_fade_in = stream_paused ? false : true;
- stream_paused_fade_out = stream_paused ? true : false;
+ stream_paused_fade_in = !stream_paused;
+ stream_paused_fade_out = stream_paused;
}
}
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index c0a4f77435..6460f17e85 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -113,7 +113,7 @@ public:
void set_perspective(float p_fovy_degrees, float p_z_near, float p_z_far);
void set_orthogonal(float p_size, float p_z_near, float p_z_far);
- void set_frustum(float p_size, Vector2 p_offset, float p_near, float p_far);
+ void set_frustum(float p_size, Vector2 p_offset, float p_z_near, float p_z_far);
void set_projection(Camera::Projection p_mode);
void make_current();
diff --git a/scene/3d/cpu_particles.h b/scene/3d/cpu_particles.h
index 6f267102fa..6566792def 100644
--- a/scene/3d/cpu_particles.h
+++ b/scene/3d/cpu_particles.h
@@ -249,7 +249,7 @@ public:
void set_color(const Color &p_color);
Color get_color() const;
- void set_color_ramp(const Ref<Gradient> &p_texture);
+ void set_color_ramp(const Ref<Gradient> &p_ramp);
Ref<Gradient> get_color_ramp() const;
void set_particle_flag(Flags p_flag, bool p_enable);
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index 909d4fda34..a9d96292a1 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -699,7 +699,6 @@ bool SoftBody::is_ray_pickable() const {
}
SoftBody::SoftBody() :
- MeshInstance(),
physics_rid(PhysicsServer::get_singleton()->soft_body_create()),
mesh_owner(false),
collision_mask(1),
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.);
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp
index 75b419ca58..5fa8c43f9f 100644
--- a/scene/3d/voxel_light_baker.cpp
+++ b/scene/3d/voxel_light_baker.cpp
@@ -212,9 +212,7 @@ static bool fast_tri_box_overlap(const Vector3 &boxcenter, const Vector3 boxhalf
/* compute plane equation of triangle: normal*x+d=0 */
normal = e0.cross(e1);
d = -normal.dot(v0); /* plane eq: normal.x+d=0 */
- if (!planeBoxOverlap(normal, d, boxhalfsize)) return false;
-
- return true; /* box and triangle overlaps */
+ return planeBoxOverlap(normal, d, boxhalfsize); /* if true, box and triangle overlaps */
}
static _FORCE_INLINE_ void get_uv_and_normal(const Vector3 &p_pos, const Vector3 *p_vtx, const Vector2 *p_uv, const Vector3 *p_normal, Vector2 &r_uv, Vector3 &r_normal) {