summaryrefslogtreecommitdiff
path: root/modules/bullet
diff options
context:
space:
mode:
authorMariano Suligoy <marianognu.easyrpg@gmail.com>2018-01-21 14:23:30 -0300
committerMariano Suligoy <marianognu.easyrpg@gmail.com>2018-01-21 14:23:30 -0300
commitd0908565608b989f8ce4bae6cbe5572f26c8cebe (patch)
tree814bf2949c997d06d30ff02d2352abd0a716602e /modules/bullet
parentfa569210f5ef316177724169a42d2b82f4ab03d9 (diff)
attemp to fix #15743
Diffstat (limited to 'modules/bullet')
-rw-r--r--modules/bullet/rigid_body_bullet.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 3edc407e87..96a53f9f8b 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -955,7 +955,8 @@ void RigidBodyBullet::_internal_set_mass(real_t p_mass) {
const bool isDynamic = p_mass != 0.f;
if (isDynamic) {
- ERR_FAIL_COND(PhysicsServer::BODY_MODE_RIGID != mode && PhysicsServer::BODY_MODE_CHARACTER != mode);
+ if (PhysicsServer::BODY_MODE_RIGID != mode && PhysicsServer::BODY_MODE_CHARACTER != mode)
+ return;
m_isStatic = false;
compoundShape->calculateLocalInertia(p_mass, localInertia);
@@ -975,7 +976,8 @@ void RigidBodyBullet::_internal_set_mass(real_t p_mass) {
}
} else {
- ERR_FAIL_COND(PhysicsServer::BODY_MODE_STATIC != mode && PhysicsServer::BODY_MODE_KINEMATIC != mode);
+ if (PhysicsServer::BODY_MODE_STATIC != mode && PhysicsServer::BODY_MODE_KINEMATIC != mode)
+ return;
m_isStatic = true;
if (PhysicsServer::BODY_MODE_STATIC == mode) {