Add flex arrays to CompareModel check.

Due to a bug, all flex mjModel fields were previously ignored.

PiperOrigin-RevId: 912546202
Change-Id: Ica95ecfcbbe366fd81de6e8f7d83ed57a7d23033
This commit is contained in:
Alessio Quaglino
2026-05-08 08:47:10 -07:00
committed by Copybara-Service
parent 8cef5bb978
commit fa912dffa0
7 changed files with 158 additions and 117 deletions
+1 -1
View File
@@ -1553,7 +1553,7 @@ void mjXReader::OneFlex(XMLElement* elem, mjsFlex* flex) {
flex->internal = (n == 1);
}
MapValue(cont, "selfcollide", &flex->selfcollide, flexself_map, 5);
if (MapValue(cont, "passive", &flex->passive, bool_map, 2)) {
if (MapValue(cont, "passive", &n, bool_map, 2)) {
flex->passive = (n == 1);
}
ReadAttrInt(cont, "activelayers", &flex->activelayers);