summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Hermansson <mikael@hermansson.io>2024-03-15 15:40:42 +0100
committerMikael Hermansson <mikael@hermansson.io>2024-03-15 15:40:42 +0100
commit7901a0524bc61aceb26c8e7790ea0c4fd880dadc (patch)
treea1ef64009e9d10696d81fdb21ad4ce6b532c9480
parent89f70e98d209563abb4dbc1f8cd5d76c81eb7940 (diff)
downloadredot-engine-7901a0524bc61aceb26c8e7790ea0c4fd880dadc.tar.gz
Allow for 32 max collisions in `test_body_motion`
-rw-r--r--servers/physics_3d/godot_space_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/godot_space_3d.cpp b/servers/physics_3d/godot_space_3d.cpp
index 46b6689533..9a6ba776b4 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();