Don't save body gravcomp if 0.
PiperOrigin-RevId: 520592156 Change-Id: Ifb85c1e78498877bc576cfca224c41b3cf47c9ab
This commit is contained in:
committed by
Copybara-Service
parent
e4d27d4b90
commit
ddfcd3b325
@@ -1321,8 +1321,9 @@ void mjXWriter::Body(XMLElement* elem, mjCBody* body) {
|
||||
}
|
||||
|
||||
// gravity compensation
|
||||
WriteAttr(elem, "gravcomp", 1, &body->gravcomp);
|
||||
|
||||
if (body->gravcomp) {
|
||||
WriteAttr(elem, "gravcomp", 1, &body->gravcomp);
|
||||
}
|
||||
// userdata
|
||||
WriteVector(elem, "user", body->userdata);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user