simulate: Add states to history when stepping with right arrow key.

PiperOrigin-RevId: 585613870
Change-Id: I7fb051946e8a91a900442e3d7048dfa8b8bd7c5c
This commit is contained in:
Yuval Tassa
2023-11-27 04:44:54 -08:00
committed by Copybara-Service
parent eb9568a48b
commit 25ddb3e6e8
+2 -1
View File
@@ -1566,9 +1566,10 @@ void UiEvent(mjuiState* state) {
mjui0_update_section(sim, SECT_SIMULATION);
}
// not in scrubber: step
// not in scrubber: step, add to history buffer
else {
mj_step(sim->m_, sim->d_);
sim->AddToHistory();
}
UpdateProfiler(sim, sim->m_, sim->d_);