From db47101f68fa3d546ce8e9227ae0796ad71e5d10 Mon Sep 17 00:00:00 2001 From: Mikael Hermansson Date: Fri, 15 Mar 2024 15:40:42 +0100 Subject: [PATCH] Allow for 32 max collisions in `test_body_motion` (cherry picked from commit 7901a0524bc61aceb26c8e7790ea0c4fd880dadc) --- servers/physics_3d/godot_space_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp index 46b6689533d..9a6ba776b42 100644 --- a/servers/physics_3d/godot_space_3d.cpp +++ b/servers/physics_3d/godot_space_3d.cpp @@ -655,7 +655,7 @@ bool GodotSpace3D::test_body_motion(GodotBody3D *p_body, const PhysicsServer3D:: //this took about a week to get right.. //but is it right? who knows at this point.. - ERR_FAIL_INDEX_V(p_parameters.max_collisions, PhysicsServer3D::MotionResult::MAX_COLLISIONS, false); + ERR_FAIL_COND_V(p_parameters.max_collisions < 0 || p_parameters.max_collisions > PhysicsServer3D::MotionResult::MAX_COLLISIONS, false); if (r_result) { *r_result = PhysicsServer3D::MotionResult();