Pause sim when loading an empty model.
PiperOrigin-RevId: 864855430 Change-Id: Ib8c2b0949ee6fda8dd1490017e146d792119e840
This commit is contained in:
committed by
Copybara-Service
parent
34add7bb32
commit
7ec8b6e341
@@ -245,10 +245,16 @@ void App::LoadModelFromBuffer(std::span<const std::byte> buffer,
|
|||||||
|
|
||||||
void App::InitModel(mjModel* model, mjSpec* spec, mjVFS* vfs,
|
void App::InitModel(mjModel* model, mjSpec* spec, mjVFS* vfs,
|
||||||
std::string filename, ModelKind model_kind) {
|
std::string filename, ModelKind model_kind) {
|
||||||
|
if (model_kind_ == kEmptyModel) {
|
||||||
|
step_control_.Unpause();
|
||||||
|
}
|
||||||
ClearModel();
|
ClearModel();
|
||||||
|
|
||||||
model_path_ = std::move(filename);
|
model_path_ = std::move(filename);
|
||||||
model_kind_ = model_kind;
|
model_kind_ = model_kind;
|
||||||
|
if (model_kind_ == kEmptyModel) {
|
||||||
|
step_control_.Pause();
|
||||||
|
}
|
||||||
|
|
||||||
spec_ = spec;
|
spec_ = spec;
|
||||||
model_ = model;
|
model_ = model;
|
||||||
|
|||||||
Reference in New Issue
Block a user