diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-09 13:01:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-09 13:01:41 +0100 |
commit | 25b36f18d38c222fb8d115a40ef1de07445e6bf8 (patch) | |
tree | 9c1795e49d29e9f6ff1c1490ac32aaffd608b17c /servers/physics/physics_server_sw.cpp | |
parent | 3fd1c0c76b61173c5d611b14b5b137fb61654f08 (diff) | |
parent | bd5df841990e7410593d8aae5bee10bab16f6f43 (diff) |
Merge pull request #12756 from Stratos695/master
Allowing double-axis lock in RigidBody & KinematicBody (Fixes #12500)
Diffstat (limited to 'servers/physics/physics_server_sw.cpp')
-rw-r--r-- | servers/physics/physics_server_sw.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp index ce63d84617..2909308366 100644 --- a/servers/physics/physics_server_sw.cpp +++ b/servers/physics/physics_server_sw.cpp @@ -794,19 +794,19 @@ void PhysicsServerSW::body_set_axis_velocity(RID p_body, const Vector3 &p_axis_v body->wakeup(); }; -void PhysicsServerSW::body_set_axis_lock(RID p_body, BodyAxisLock p_lock) { +void PhysicsServerSW::body_set_axis_lock(RID p_body, int axis, bool lock) { BodySW *body = body_owner.get(p_body); ERR_FAIL_COND(!body); - body->set_axis_lock(p_lock); + body->set_axis_lock(axis, lock); body->wakeup(); } -PhysicsServerSW::BodyAxisLock PhysicsServerSW::body_get_axis_lock(RID p_body) const { +bool PhysicsServerSW::body_get_axis_lock(RID p_body) const { const BodySW *body = body_owner.get(p_body); - ERR_FAIL_COND_V(!body, BODY_AXIS_LOCK_DISABLED); + ERR_FAIL_COND_V(!body, 0); return body->get_axis_lock(); } |