Merge pull request #21564 from ibrahn/fix-move-slide-crash

Initialise rays_found count in test_ray_separation.
This commit is contained in:
Rémi Verschelde 2018-08-29 14:50:44 +02:00 committed by GitHub
commit 27ae49ea29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -980,7 +980,7 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform &p
btVector3 recover_motion(0, 0, 0); btVector3 recover_motion(0, 0, 0);
int rays_found; int rays_found = 0;
for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) { for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) {
int last_ray_index = recover_from_penetration_ray(p_body, body_transform, RECOVERING_MOVEMENT_SCALE, p_infinite_inertia, p_result_max, recover_motion, r_results); int last_ray_index = recover_from_penetration_ray(p_body, body_transform, RECOVERING_MOVEMENT_SCALE, p_infinite_inertia, p_result_max, recover_motion, r_results);