feat: both shapes in check_collisions_for can now add overlap

main
Sara 2025-01-06 10:55:53 +01:00
parent 60c320fb10
commit 68dd2f0d06
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ void CollisionWorld::check_collisions_for(CollisionShape *shape, std::vector<Col
if(other != shape && CollisionShape::shapes_overlap(shape, other)) {
if((shape->get_mask() & other->get_layers()) != 0x0u)
shape->get_owner()->add_overlap(shape, other);
if((shape->get_layers() & other->get_mask()) != 0x0u)
other->get_owner()->add_overlap(other, shape);
}
}
}