diff options
author | Erik <35656626+SeleckyErik@users.noreply.github.com> | 2018-10-05 02:24:41 +0200 |
---|---|---|
committer | Erik <35656626+SeleckyErik@users.noreply.github.com> | 2018-10-11 12:19:03 +0200 |
commit | 09250850ecff1ede552dd2d201c348c3376f687f (patch) | |
tree | 097a9429fc888d5d5fc747f6679356f3c77f524e /servers | |
parent | 4c1a5d9cfe2da761bfe17d52126deabc1f1c1bd3 (diff) |
Fixed non-monitorable areas triggering overlap
Non-monitorable areas are never removed from the monitor query of other areas. This makes areas that turn not
monitorable while overlapping with other areas get stuck in the other areas' monitor query and trigger false
overlaps.
This is a fix for issue #9148.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_2d/area_pair_2d_sw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/area_pair_2d_sw.cpp b/servers/physics_2d/area_pair_2d_sw.cpp index 9d515d2183..cdd35cf657 100644 --- a/servers/physics_2d/area_pair_2d_sw.cpp +++ b/servers/physics_2d/area_pair_2d_sw.cpp @@ -147,10 +147,10 @@ Area2Pair2DSW::~Area2Pair2DSW() { if (colliding) { - if (area_b->has_area_monitor_callback() && area_a->is_monitorable()) + if (area_b->has_area_monitor_callback()) area_b->remove_area_from_query(area_a, shape_a, shape_b); - if (area_a->has_area_monitor_callback() && area_b->is_monitorable()) + if (area_a->has_area_monitor_callback()) area_a->remove_area_from_query(area_b, shape_b, shape_a); } |