This commit is contained in:
aozhiwei 2023-05-25 15:32:12 +08:00
parent af6bbbdaf2
commit 1d176d805d

View File

@ -250,6 +250,19 @@ namespace mt
if (_group_world_objects.find(ikey) != _group_world_objects.end()) { if (_group_world_objects.find(ikey) != _group_world_objects.end()) {
abort(); abort();
} }
std::vector<std::shared_ptr<WorldObject>> objects;
auto items = group_obj->At(key);
for (int iii = 0; iii < items->Size(); ++iii) {
auto item_obj = items->At(iii);
auto obj = std::make_shared<WorldObject>();
{
obj->pos.x = item_obj->At("x")->AsXValue().GetDouble();
obj->pos.y = item_obj->At("y")->AsXValue().GetDouble();
obj->pos.z = item_obj->At("z")->AsXValue().GetDouble();
}
objects.push_back(obj);
}
_group_world_objects[ikey] = objects;
} }
} }
} }