Skip to content

Commit b3a9adf

Browse files
committed
Moved it to the end of do_impact
This will actually fix it.
1 parent 5763a4e commit b3a9adf

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ivp_intern/ivp_impact.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,16 +1236,6 @@ void IVP_Mindist::do_impact(){
12361236
}
12371237

12381238
g_pCurrentMindist = NULL;
1239-
if (g_fDeferDeleteMindist)
1240-
{
1241-
// BUGBUG: someone changed a collision filter and didn't tell us!
1242-
// Calling recheck_collision_filter should fix it and stop it from breaking the entire engine. (Never call "delete this;" here).
1243-
// In most cases, this IVP_Mindist will also be deleted from recheck_collision_filter.
1244-
for (int i = 0;i<2;i++){
1245-
objects[i]->recheck_collision_filter();
1246-
}
1247-
return;
1248-
}
12491239

12501240
//revive_object_core is calling start_memory_transaction and end_memory_transaction, so we cannot start memory transaction earlier
12511241
env->sim_unit_mem->start_memory_transaction();
@@ -1261,6 +1251,16 @@ void IVP_Mindist::do_impact(){
12611251

12621252
IVP_Impact_Solver_Long_Term::do_impact_of_two_objects(this, objects[0], objects[1] );
12631253
env->sim_unit_mem->end_memory_transaction();
1254+
1255+
if (g_fDeferDeleteMindist)
1256+
{
1257+
// BUGBUG: someone changed a collision filter and didn't tell us!
1258+
// Calling recheck_collision_filter should fix it and stop it from breaking the entire engine. (Never call "delete this;" here).
1259+
// In most cases, this IVP_Mindist will also be deleted from recheck_collision_filter.
1260+
for (int i = 0;i<2;i++){
1261+
objects[i]->recheck_collision_filter();
1262+
}
1263+
}
12641264
}
12651265

12661266
//find second critical core for core0 that is not core1

0 commit comments

Comments
 (0)