Fix wrong index being used to populate r_results
Regression from f33d9da
.
This commit is contained in:
parent
e57dfe2663
commit
9457211f8f
1 changed files with 10 additions and 10 deletions
|
@ -175,10 +175,7 @@ int PhysicsDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Transfo
|
||||||
if (!CollisionSolverSW::solve_static(shape,p_xform,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), NULL,NULL,NULL,p_margin,0))
|
if (!CollisionSolverSW::solve_static(shape,p_xform,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), NULL,NULL,NULL,p_margin,0))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cc++;
|
if (r_results) {
|
||||||
|
|
||||||
if (!r_results)
|
|
||||||
continue;
|
|
||||||
r_results[cc].collider_id=col_obj->get_instance_id();
|
r_results[cc].collider_id=col_obj->get_instance_id();
|
||||||
if (r_results[cc].collider_id!=0)
|
if (r_results[cc].collider_id!=0)
|
||||||
r_results[cc].collider=ObjectDB::get_instance(r_results[cc].collider_id);
|
r_results[cc].collider=ObjectDB::get_instance(r_results[cc].collider_id);
|
||||||
|
@ -186,6 +183,9 @@ int PhysicsDirectSpaceStateSW::intersect_shape(const RID& p_shape, const Transfo
|
||||||
r_results[cc].collider=NULL;
|
r_results[cc].collider=NULL;
|
||||||
r_results[cc].rid=col_obj->get_self();
|
r_results[cc].rid=col_obj->get_self();
|
||||||
r_results[cc].shape=shape_idx;
|
r_results[cc].shape=shape_idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
cc++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue