summaryrefslogtreecommitdiff
path: root/servers/physics_2d/physics_2d_server_sw.cpp
diff options
context:
space:
mode:
authorAndreaCatania <info@andreacatania.com>2017-10-24 18:10:30 +0200
committerAndrea Catania <info@andreacatania.com>2018-05-11 03:23:09 +0200
commit5f66734d2d70951b273a078a3ee20e406cf0f84d (patch)
tree689a85b054958619613b69e8299142bd461b58b3 /servers/physics_2d/physics_2d_server_sw.cpp
parenta415efa4b749da90c86db5ac4664491e2ee125dd (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.cpp16
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);