Update list ids immediately during body detach.
Fixes #2499. PiperOrigin-RevId: 736449320 Change-Id: Ieeae52bdbbbb896d886221ab088229c8287a32a3
This commit is contained in:
committed by
Copybara-Service
parent
8f4c5c4b16
commit
8e300eb628
@@ -494,6 +494,10 @@ void mjCModel::RemoveFromList(std::vector<T*>& list, const mjCModel& other) {
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
if (removed > 0 && !list.empty()) {
|
||||
// if any elements were removed, update ids using processlist
|
||||
processlist(ids, list, list[0]->elemtype, /*checkrepeat=*/false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user