Fix RigidBodyBullet areasWhereIam element shift.

This commit is contained in:
Marcel Admiraal 2020-09-14 18:19:38 +01:00
parent c5f7a581f7
commit 7e73dd0b2e

View file

@ -849,8 +849,8 @@ void RigidBodyBullet::on_enter_area(AreaBullet *p_area) {
} else {
if (areasWhereIam[i]->get_spOv_priority() > p_area->get_spOv_priority()) {
// The position was found, just shift all elements
for (int j = i; j < areaWhereIamCount; ++j) {
areasWhereIam[j + 1] = areasWhereIam[j];
for (int j = areaWhereIamCount; j > i; j--) {
areasWhereIam[j] = areasWhereIam[j - 1];
}
areasWhereIam[i] = p_area;
break;