@@ -130,7 +130,7 @@ bool Box2DDirectSpaceState2D::_collide_shape(const RID &shape_rid, const Transfo
130
130
box2d::ShapeInfo shape_info = box2d::shape_info_from_body_shape (shape_handle, Transform2D (), transform);
131
131
box2d::QueryExcludedInfo query_excluded_info = box2d::default_query_excluded_info ();
132
132
query_excluded_info.query_collision_layer_mask = collision_mask;
133
- // query_excluded_info.query_exclude = (b2ShapeId *)memalloc((max_results) * sizeof(b2ShapeId));
133
+ query_excluded_info.query_exclude = (b2ShapeId *)memalloc ((max_results) * sizeof (b2ShapeId));
134
134
query_excluded_info.query_exclude_size = 0 ;
135
135
136
136
int cpt = 0 ;
@@ -141,15 +141,15 @@ bool Box2DDirectSpaceState2D::_collide_shape(const RID &shape_rid, const Transfo
141
141
break ;
142
142
}
143
143
(*result_count)++;
144
- // query_excluded_info.query_exclude[query_excluded_info.query_exclude_size++] = result.collider;
144
+ query_excluded_info.query_exclude [query_excluded_info.query_exclude_size ++] = result.collider ;
145
145
if (results_out != nullptr ) {
146
146
results_out[array_idx++] = Vector2 (result.witness1 .x , result.witness1 .y );
147
147
results_out[array_idx++] = Vector2 (result.witness2 .x , result.witness2 .y );
148
148
}
149
149
150
150
cpt++;
151
151
} while (cpt < max_results);
152
- // memfree(query_excluded_info.query_exclude);
152
+ memfree (query_excluded_info.query_exclude );
153
153
return array_idx > 0 ;
154
154
}
155
155
@@ -164,7 +164,7 @@ int Box2DDirectSpaceState2D::_intersect_shape(const RID &shape_rid, const Transf
164
164
165
165
box2d::QueryExcludedInfo query_excluded_info = box2d::default_query_excluded_info ();
166
166
query_excluded_info.query_collision_layer_mask = collision_mask;
167
- // query_excluded_info.query_exclude = (b2ShapeId *)memalloc((p_result_max) * sizeof(b2ShapeId));
167
+ query_excluded_info.query_exclude = (b2ShapeId *)memalloc ((p_result_max) * sizeof (b2ShapeId));
168
168
query_excluded_info.query_exclude_size = 0 ;
169
169
170
170
int cpt = 0 ;
@@ -173,7 +173,7 @@ int Box2DDirectSpaceState2D::_intersect_shape(const RID &shape_rid, const Transf
173
173
if (!result.collided ) {
174
174
break ;
175
175
}
176
- // query_excluded_info.query_exclude[query_excluded_info.query_exclude_size++] = result.collider;
176
+ query_excluded_info.query_exclude [query_excluded_info.query_exclude_size ++] = result.collider ;
177
177
178
178
ERR_CONTINUE_MSG (!box2d::is_user_data_valid (result.user_data ), " Invalid user data" );
179
179
uint32_t shape_index = 0 ;
@@ -194,7 +194,7 @@ int Box2DDirectSpaceState2D::_intersect_shape(const RID &shape_rid, const Transf
194
194
195
195
} while (cpt < p_result_max);
196
196
197
- // memfree(query_excluded_info.query_exclude);
197
+ memfree (query_excluded_info.query_exclude );
198
198
return cpt;
199
199
}
200
200
0 commit comments