Reset contact efc_address in mj_clearEfc, fixes #2869
The truth is that all these solver-related values should be moved out of `mjContact` altogether, but that can be done in a future followup. PiperOrigin-RevId: 818624976 Change-Id: I5b9e63927098cdf26b9f8acfdd9d86e75d6ce331
This commit is contained in:
committed by
Copybara-Service
parent
9b7e7e471d
commit
bbeb0b95a7
@@ -75,6 +75,11 @@ static inline void mj_clearEfc(mjData* d) {
|
||||
d->nefc = 0;
|
||||
d->nisland = 0;
|
||||
d->contact = (mjContact*) d->arena;
|
||||
|
||||
// if any contacts are allocated, clear their efc_address
|
||||
for (int i=0; i < d->ncon; i++) {
|
||||
d->contact[i].efc_address = -1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user