Clear a Bullet Area's overlappingObjects vector when removing an area

from a space.
This commit is contained in:
Marcel Admiraal 2020-07-06 12:00:53 +01:00
parent a8e330ea19
commit a615d359e8
1 changed files with 1 additions and 0 deletions

View File

@ -174,6 +174,7 @@ void AreaBullet::reload_body() {
void AreaBullet::set_space(SpaceBullet *p_space) { void AreaBullet::set_space(SpaceBullet *p_space) {
// Clear the old space if there is one // Clear the old space if there is one
if (space) { if (space) {
overlappingObjects.clear();
isScratched = false; isScratched = false;
// Remove this object form the physics world // Remove this object form the physics world