diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-02 23:20:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 23:20:41 +0100 |
commit | 81c93caf021c301a1e94132dab3bb15670f4bcb7 (patch) | |
tree | dd03bb85760fb381dcff385b9a8f660ea65b2f48 /modules/bullet/bullet_physics_server.cpp | |
parent | fe6c65a1a82ceb66fc15c3e76a01e17cb7fede22 (diff) | |
parent | 770e3a8e5150a32d9a9955b7e4b176249cd8f6b9 (diff) |
Merge pull request #54471 from rafallus/callable_area_monitor
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r-- | modules/bullet/bullet_physics_server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index bb2db49c87..610d2145cd 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -413,18 +413,18 @@ void BulletPhysicsServer3D::area_set_monitorable(RID p_area, bool p_monitorable) area->set_monitorable(p_monitorable); } -void BulletPhysicsServer3D::area_set_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) { +void BulletPhysicsServer3D::area_set_monitor_callback(RID p_area, const Callable &p_callback) { AreaBullet *area = area_owner.get_or_null(p_area); ERR_FAIL_COND(!area); - area->set_event_callback(CollisionObjectBullet::TYPE_RIGID_BODY, p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method); + area->set_event_callback(CollisionObjectBullet::TYPE_RIGID_BODY, p_callback.is_valid() ? p_callback : Callable()); } -void BulletPhysicsServer3D::area_set_area_monitor_callback(RID p_area, Object *p_receiver, const StringName &p_method) { +void BulletPhysicsServer3D::area_set_area_monitor_callback(RID p_area, const Callable &p_callback) { AreaBullet *area = area_owner.get_or_null(p_area); ERR_FAIL_COND(!area); - area->set_event_callback(CollisionObjectBullet::TYPE_AREA, p_receiver ? p_receiver->get_instance_id() : ObjectID(), p_method); + area->set_event_callback(CollisionObjectBullet::TYPE_AREA, p_callback.is_valid() ? p_callback : Callable()); } void BulletPhysicsServer3D::area_set_ray_pickable(RID p_area, bool p_enable) { |