summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrea Catania <info@andreacatania.com>2018-04-12 11:37:36 +0200
committerAndrea Catania <info@andreacatania.com>2018-04-12 11:37:36 +0200
commit2cfa86122294f6b5402bf9852171023be1fc15cb (patch)
tree397a124d7b054be34bb030a11bba2f18a10f6c25 /modules
parentdf2a626b49a4e8ead003ebefb9663c63156b4efa (diff)
Removed useless check
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/godot_result_callbacks.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index caa3d677dd..1bf259da84 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -172,10 +172,7 @@ btScalar GodotAllContactResultCallback::addSingleResult(btManifoldPoint &cp, con
result.shape = cp.m_index0;
}
- if (colObj)
- result.collider_id = colObj->get_instance_id();
- else
- result.collider_id = 0;
+ result.collider_id = colObj->get_instance_id();
result.collider = 0 == result.collider_id ? NULL : ObjectDB::get_instance(result.collider_id);
result.rid = colObj->get_self();
++m_count;
@@ -250,10 +247,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp
m_rest_info_collision_object = colObj0Wrap->getCollisionObject();
}
- if (colObj)
- m_result->collider_id = colObj->get_instance_id();
- else
- m_result->collider_id = 0;
+ m_result->collider_id = colObj->get_instance_id();
m_result->rid = colObj->get_self();
m_collided = true;