diff options
| author | Juan Linietsky | 2017-09-17 10:18:09 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-09-17 10:18:09 -0300 |
| commit | d22ceeef1bec083d5e047458e88d97ca091cd1c5 (patch) | |
| tree | 286a6e908f85d04473899d5ea03913fd49289e0a /servers/physics_2d/space_2d_sw.cpp | |
| parent | 5886f810c20027f7958eff62d2c876c8b29fef1e (diff) | |
| download | godot-d22ceeef1bec083d5e047458e88d97ca091cd1c5.tar.gz godot-d22ceeef1bec083d5e047458e88d97ca091cd1c5.tar.zst godot-d22ceeef1bec083d5e047458e88d97ca091cd1c5.zip | |
correction to one way collision code
Diffstat (limited to 'servers/physics_2d/space_2d_sw.cpp')
| -rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index cbfbb38bc..8f22d1cd4 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -580,7 +580,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co ExcludedShapeSW esp; esp.local_shape = body_shape; esp.against_object = col_obj; - esp.against_shape = against_shape; + esp.against_shape_index = shape_idx; excluded_shape_pairs[excluded_shape_pair_count++] = esp; } } @@ -649,7 +649,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co for (int k = 0; k < excluded_shape_pair_count; k++) { - if (excluded_shape_pairs[k].local_shape == body_shape && excluded_shape_pairs[k].against_object == col_obj && excluded_shape_pairs[k].against_shape == against_shape) { + if (excluded_shape_pairs[k].local_shape == body_shape && excluded_shape_pairs[k].against_object == col_obj && excluded_shape_pairs[k].against_shape_index == shape_idx) { excluded = true; break; } @@ -780,7 +780,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co bool excluded = false; for (int k = 0; k < excluded_shape_pair_count; k++) { - if (excluded_shape_pairs[k].local_shape == body_shape && excluded_shape_pairs[k].against_object == col_obj && excluded_shape_pairs[k].against_shape == against_shape) { + if (excluded_shape_pairs[k].local_shape == body_shape && excluded_shape_pairs[k].against_object == col_obj && excluded_shape_pairs[k].against_shape_index == shape_idx) { excluded = true; break; } |
