Place a hard limit on the max_contacts_reported property

This commit is contained in:
Aaron Franke 2025-01-01 17:20:07 -08:00
parent 7598b08ec2
commit a5de242a2f
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
7 changed files with 9 additions and 1 deletions

View file

@ -175,6 +175,7 @@ public:
}
_FORCE_INLINE_ void set_max_contacts_reported(int p_size) {
ERR_FAIL_INDEX(p_size, MAX_CONTACTS_REPORTED_3D_MAX);
contacts.resize(p_size);
contact_count = 0;
if (mode == PhysicsServer3D::BODY_MODE_KINEMATIC && p_size) {