Навёл порядок в тестах. Добавил тесты для мира. Исправил ошибку в SpawnActorFromClass

This commit is contained in:
Jiga228
2026-06-28 19:26:23 +07:00
parent ad881a97a9
commit 82ba9fd191
21 changed files with 404 additions and 56 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ std::shared_ptr<SaveMap> Actor::save()
save->SaveObject("loc", loc_);
save->SaveObject("rot", rot_);
save->SaveObject("scale", scale_);
save->SaveListStrings("tags", std::move(tags));
save->SaveListStrings("tags", std::move(tags_));
return save;
}
@@ -27,7 +27,7 @@ void Actor::load(std::shared_ptr<SaveMap> save)
loc_ = std::static_pointer_cast<Vector3D>(save->GetObject("loc"));
rot_ = std::static_pointer_cast<Vector3D>(save->GetObject("rot"));
scale_ = std::static_pointer_cast<Vector3D>(save->GetObject("scale"));
tags = std::move(save->GetListString("tags"));
tags_ = std::move(save->GetListString("tags"));
}
void Actor::BeginPlay()
@@ -52,10 +52,10 @@ void Actor::SetActorRotate(const Vector3D& rot) noexcept
void Actor::AddTag(const std::string& tag) noexcept
{
tags.push_back(tag);
tags_.push_back(tag);
}
void Actor::RemoveTag(const std::string& tag) noexcept
{
tags.remove(tag);
tags_.remove(tag);
}