mirror of
https://github.com/godotengine/godot.git
synced 2024-11-13 23:52:41 +00:00
Add area monitor callback error checking
This commit is contained in:
parent
3976bddaf4
commit
4f5c268a60
@ -132,6 +132,10 @@ void AreaBullet::call_event(const OverlappingShapeData &p_overlapping_shape, Phy
|
||||
|
||||
Variant::CallError outResp;
|
||||
areaGodoObject->call(event.event_callback_method, (const Variant **)call_event_res_ptr, 5, outResp);
|
||||
|
||||
if (outResp.error != Variant::CallError::CALL_OK) {
|
||||
ERR_PRINT_ONCE("Error calling event callback method " + Variant::get_call_error_text(areaGodoObject, event.event_callback_method, (const Variant **)call_event_res_ptr, 5, outResp));
|
||||
}
|
||||
}
|
||||
|
||||
int AreaBullet::_overlapping_shape_count(CollisionObjectBullet *p_other_object) {
|
||||
|
@ -228,6 +228,10 @@ void AreaSW::call_queries() {
|
||||
|
||||
Variant::CallError ce;
|
||||
obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce);
|
||||
|
||||
if (ce.error != Variant::CallError::CALL_OK) {
|
||||
ERR_PRINT_ONCE("Error calling monitor callback method " + Variant::get_call_error_text(obj, monitor_callback_method, (const Variant **)resptr, 5, ce));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
monitored_bodies.clear();
|
||||
@ -264,6 +268,10 @@ void AreaSW::call_queries() {
|
||||
|
||||
Variant::CallError ce;
|
||||
obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce);
|
||||
|
||||
if (ce.error != Variant::CallError::CALL_OK) {
|
||||
ERR_PRINT_ONCE("Error calling area monitor callback method " + Variant::get_call_error_text(obj, area_monitor_callback_method, (const Variant **)resptr, 5, ce));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
monitored_areas.clear();
|
||||
|
@ -228,6 +228,10 @@ void Area2DSW::call_queries() {
|
||||
|
||||
Variant::CallError ce;
|
||||
obj->call(monitor_callback_method, (const Variant **)resptr, 5, ce);
|
||||
|
||||
if (ce.error != Variant::CallError::CALL_OK) {
|
||||
ERR_PRINT_ONCE("Error calling monitor callback method " + Variant::get_call_error_text(obj, monitor_callback_method, (const Variant **)resptr, 5, ce));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
monitored_bodies.clear();
|
||||
@ -264,6 +268,10 @@ void Area2DSW::call_queries() {
|
||||
|
||||
Variant::CallError ce;
|
||||
obj->call(area_monitor_callback_method, (const Variant **)resptr, 5, ce);
|
||||
|
||||
if (ce.error != Variant::CallError::CALL_OK) {
|
||||
ERR_PRINT_ONCE("Error calling area monitor callback method " + Variant::get_call_error_text(obj, area_monitor_callback_method, (const Variant **)resptr, 5, ce));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
monitored_areas.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user