diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-30 11:43:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 11:43:11 +0200 |
commit | f40c62fa29e8b08fe69487efa92fd08a3dea742c (patch) | |
tree | 233141d0d8b516ce95830fa898cba244fe29d350 /servers/physics/collision_object_sw.cpp | |
parent | 6ee5f7c8819847615c5e96ed92a2a86737350459 (diff) | |
parent | a9d4cde0f5abc399332dde0c7415b99a5796eb34 (diff) |
Merge pull request #27371 from ShyRed/fixdisabled2dcollisions
Allow adding disabled shapes
Diffstat (limited to 'servers/physics/collision_object_sw.cpp')
-rw-r--r-- | servers/physics/collision_object_sw.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/servers/physics/collision_object_sw.cpp b/servers/physics/collision_object_sw.cpp index 085ad4f9ea..b1c21290ab 100644 --- a/servers/physics/collision_object_sw.cpp +++ b/servers/physics/collision_object_sw.cpp @@ -32,13 +32,14 @@ #include "servers/physics/physics_server_sw.h" #include "space_sw.h" -void CollisionObjectSW::add_shape(ShapeSW *p_shape, const Transform &p_transform) { +void CollisionObjectSW::add_shape(ShapeSW *p_shape, const Transform &p_transform, bool p_disabled) { Shape s; s.shape = p_shape; s.xform = p_transform; s.xform_inv = s.xform.affine_inverse(); s.bpid = 0; //needs update + s.disabled = p_disabled; shapes.push_back(s); p_shape->add_owner(this); |