This commit is contained in:
aozhiwei 2023-05-25 15:17:54 +08:00
parent f28bb50664
commit af6bbbdaf2
2 changed files with 17 additions and 0 deletions

View File

@ -238,6 +238,22 @@ namespace mt
_world_objects.push_back(obj); _world_objects.push_back(obj);
} }
} }
{
auto group = root.At("group");
for (int i = 0; i < group->Size(); ++i) {
auto group_obj = group->At(i);
for (int ii = 0; ii < group_obj->Size(); ++ii) {
std::vector<std::string> keys;
group_obj->GetKeys(keys);
for (auto key : keys) {
int ikey = a8::XValue(key);
if (_group_world_objects.find(ikey) != _group_world_objects.end()) {
abort();
}
}
}
}
}
} }
} }

View File

@ -34,6 +34,7 @@ namespace mt
std::map<int, int> car_num_limit_; std::map<int, int> car_num_limit_;
std::vector<int> safearea_list; std::vector<int> safearea_list;
std::vector<std::shared_ptr<WorldObject>> _world_objects; std::vector<std::shared_ptr<WorldObject>> _world_objects;
std::map<int, std::vector<std::shared_ptr<WorldObject>>> _group_world_objects;
MapCollider* collider_info = nullptr; MapCollider* collider_info = nullptr;
std::string RandTemplate() const; std::string RandTemplate() const;