diff options
| author | Juan Linietsky <juan@godotengine.org> | 2020-02-12 14:24:06 -0300 |
|---|---|---|
| committer | Juan Linietsky <juan@godotengine.org> | 2020-02-12 14:24:54 -0300 |
| commit | cf8c679a23b21d6c6f29cba6a54eaa2eed88bf92 (patch) | |
| tree | 52aca947b395362b2addec4843915b15947c32ca /modules/bullet/godot_result_callbacks.cpp | |
| parent | 4aa31a2851e3dd5b67193194f899850239b2669d (diff) | |
| download | redot-engine-cf8c679a23b21d6c6f29cba6a54eaa2eed88bf92.tar.gz | |
ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
Diffstat (limited to 'modules/bullet/godot_result_callbacks.cpp')
| -rw-r--r-- | modules/bullet/godot_result_callbacks.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp index 6e54d10abf..20467e3ef3 100644 --- a/modules/bullet/godot_result_callbacks.cpp +++ b/modules/bullet/godot_result_callbacks.cpp @@ -112,7 +112,7 @@ btScalar GodotAllConvexResultCallback::addSingleResult(btCollisionWorld::LocalCo result.shape = convexResult.m_localShapeInfo->m_triangleIndex; // "m_triangleIndex" Is a odd name but contains the compound shape ID result.rid = gObj->get_self(); result.collider_id = gObj->get_instance_id(); - result.collider = 0 == result.collider_id ? NULL : ObjectDB::get_instance(result.collider_id); + result.collider = result.collider_id.is_null() ? NULL : ObjectDB::get_instance(result.collider_id); ++count; return 1; // not used by bullet @@ -220,7 +220,7 @@ btScalar GodotAllContactResultCallback::addSingleResult(btManifoldPoint &cp, con } result.collider_id = colObj->get_instance_id(); - result.collider = 0 == result.collider_id ? NULL : ObjectDB::get_instance(result.collider_id); + result.collider = result.collider_id.is_null() ? NULL : ObjectDB::get_instance(result.collider_id); result.rid = colObj->get_self(); ++m_count; } |
