diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-12 06:14:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-12 06:14:15 -0300 |
commit | a625f7d07317ac4fac21962a99a7896ed13010c7 (patch) | |
tree | ffd18fbbd0507555e8c9966947e5c6a4bb1db1ad /scene/2d/area_2d.cpp | |
parent | eab1e5b5967ccebf00ce1d456eb1fd6ee28ec96d (diff) | |
download | redot-engine-a625f7d07317ac4fac21962a99a7896ed13010c7.tar.gz |
-Properly lock and and warn about switching off contact monitoring, fixes #3041
Diffstat (limited to 'scene/2d/area_2d.cpp')
-rw-r--r-- | scene/2d/area_2d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 464553b982..50a115174d 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -420,13 +420,13 @@ void Area2D::_notification(int p_what) { void Area2D::set_enable_monitoring(bool p_enable) { - if (locked) { - ERR_EXPLAIN("This function can't be used during the in/out signal."); - } - ERR_FAIL_COND(locked); if (p_enable==monitoring) return; + if (locked) { + ERR_EXPLAIN("Function blocked during in/out signal. Use call_deferred(\"set_enable_monitoring\",true/false)"); + } + ERR_FAIL_COND(locked); monitoring=p_enable; |