diff options
author | AndreaCatania <info@andreacatania.com> | 2017-10-24 18:10:30 +0200 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2018-05-11 03:23:09 +0200 |
commit | 5f66734d2d70951b273a078a3ee20e406cf0f84d (patch) | |
tree | 689a85b054958619613b69e8299142bd461b58b3 /servers/physics_2d/physics_2d_server_sw.cpp | |
parent | a415efa4b749da90c86db5ac4664491e2ee125dd (diff) |
Implemented physics material
Hidden a function
Fixed travis static check
Diffstat (limited to 'servers/physics_2d/physics_2d_server_sw.cpp')
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index a14fed8184..d17f5dd3ef 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -789,6 +789,22 @@ real_t Physics2DServerSW::body_get_param(RID p_body, BodyParameter p_param) cons return body->get_param(p_param); }; +void Physics2DServerSW::body_set_combine_mode(RID p_body, BodyParameter p_param, CombineMode p_mode) { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND(!body); + + body->set_combine_mode(p_param, p_mode); +} + +Physics2DServer::CombineMode Physics2DServerSW::body_get_combine_mode(RID p_body, BodyParameter p_param) const { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND_V(!body, COMBINE_MODE_INHERIT); + + return body->get_combine_mode(p_param); +} + void Physics2DServerSW::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) { Body2DSW *body = body_owner.get(p_body); |