diff options
author | Siddharth <siddharth952@gmail.com> | 2019-03-23 20:09:08 +0530 |
---|---|---|
committer | Siddharth <siddharth952@gmail.com> | 2019-03-23 20:09:08 +0530 |
commit | 13ead635d93737d3817568e87941db663f5190d9 (patch) | |
tree | 37594dc8f775ac647367ef77c18a6a19a5e8dfd5 /scene | |
parent | 2d995372d8e4e47086fbf0b8a71224cd7b763f81 (diff) | |
parent | 9c3ddf05cb9c59817d885e9daca6e8f61c89dc97 (diff) |
Merge branch 'master' of https://github.com/godotengine/godot into issue1
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 1b7e1a6b8b..690f1d4b4a 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -199,7 +199,7 @@ real_t StaticBody2D::get_constant_angular_velocity() const { #ifndef DISABLE_DEPRECATED void StaticBody2D::set_friction(real_t p_friction) { - if (p_friction == 1.0) { // default value, don't create an override for that + if (p_friction == 1.0 && physics_material_override.is_null()) { // default value, don't create an override for that return; } @@ -229,7 +229,7 @@ real_t StaticBody2D::get_friction() const { void StaticBody2D::set_bounce(real_t p_bounce) { - if (p_bounce == 0.0) { // default value, don't create an override for that + if (p_bounce == 0.0 && physics_material_override.is_null()) { // default value, don't create an override for that return; } @@ -626,7 +626,7 @@ real_t RigidBody2D::get_weight() const { #ifndef DISABLE_DEPRECATED void RigidBody2D::set_friction(real_t p_friction) { - if (p_friction == 1.0) { // default value, don't create an override for that + if (p_friction == 1.0 && physics_material_override.is_null()) { // default value, don't create an override for that return; } @@ -655,7 +655,7 @@ real_t RigidBody2D::get_friction() const { void RigidBody2D::set_bounce(real_t p_bounce) { - if (p_bounce == 0.0) { // default value, don't create an override for that + if (p_bounce == 0.0 && physics_material_override.is_null()) { // default value, don't create an override for that return; } |