summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-25 08:11:17 +0200
committerGitHub <noreply@github.com>2017-07-25 08:11:17 +0200
commitf981829749e6d44569068776b47cd87012604b97 (patch)
tree035c8ea68b98f037635eef2b3b8598632c80d055 /servers
parent233baf9208766dae80e2b03207993e4f612739b4 (diff)
parentb4129df96c455b0657712b8f6a772265a22e2265 (diff)
Merge pull request #9830 from RandomShaper/fix-9692
Fix crash in Space2DSW::test_body_motion()
Diffstat (limited to 'servers')
-rw-r--r--servers/physics_2d/space_2d_sw.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index c407a17bc6..a17d1f6a12 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -553,7 +553,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
const CollisionObject2DSW *col_obj = intersection_query_results[i];
int shape_idx = intersection_query_subindex_results[i];
- if (col_obj->is_shape_set_as_one_way_collision(j)) {
+ if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
cbk.valid_dir = body_shape_xform.get_axis(1).normalized();
cbk.valid_depth = p_margin; //only valid depth is the collision margin