general stability updates

This commit is contained in:
turanszkij
2017-11-27 16:46:39 +00:00
parent dfa25ea44f
commit efd040a1d1
9 changed files with 265 additions and 312 deletions
+26 -2
View File
@@ -1065,7 +1065,14 @@ void EditorComponent::Update(float dt)
for (auto& x : savedParents)
{
*archive << x.first->GetID();
*archive << x.second->GetID();
if (x.second == nullptr)
{
*archive << Transform::INVALID_ID;
}
else
{
*archive << x.second->GetID();
}
}
if (picked->transform != nullptr)
@@ -1117,7 +1124,14 @@ void EditorComponent::Update(float dt)
for (auto& x : savedParents)
{
*archive << x.first->GetID();
*archive << x.second->GetID();
if (x.second == nullptr)
{
*archive << Transform::INVALID_ID;
}
else
{
*archive << x.second->GetID();
}
}
}
@@ -1732,6 +1746,16 @@ void ConsumeHistoryOperation(bool undo)
decal->SetID(id);
model->Add(decal);
}
// force field
*archive >> tmp;
if (tmp)
{
ForceField* force = new ForceField;
force->Serialize(*archive);
force->SetID(id);
model->Add(force);
}
}
if (undo)