This commit is contained in:
aozhiwei 2023-10-25 11:43:41 +08:00
parent 5bea65c585
commit bc915e2c3f
4 changed files with 8 additions and 3 deletions

View File

@ -133,7 +133,7 @@ namespace mt
void Map::Init2()
{
{
if (!IsPveMap() && safearea_list.empty()) {
if (!IsPveMap() && !is_moba() && safearea_list.empty()) {
A8_ABORT();
}
for (const int area_type : safearea_list) {

View File

@ -38,6 +38,7 @@ namespace mtb
const std::string ground_sampling_pos() const { return ground_sampling_pos_; };
const std::string navmesh_file() const { return navmesh_file_; };
int moba_time() const { return moba_time_; };
int is_moba() const { return is_moba_; };
bool has_map_id() const { return __flags__.test(0);};
bool has_template_list() const { return __flags__.test(1);};
@ -67,6 +68,7 @@ namespace mtb
bool has_ground_sampling_pos() const { return __flags__.test(25);};
bool has_navmesh_file() const { return __flags__.test(26);};
bool has_moba_time() const { return __flags__.test(27);};
bool has_is_moba() const { return __flags__.test(28);};
protected:
@ -98,9 +100,10 @@ namespace mtb
std::string ground_sampling_pos_;
std::string navmesh_file_;
int moba_time_ = 0;
int is_moba_ = 0;
public:
std::bitset<28> __flags__;
std::bitset<29> __flags__;
};
};

View File

@ -71,7 +71,7 @@ namespace mtb
{
a8::reflect::Class* meta_class = nullptr;
if (!meta_class) {
meta_class = new a8::reflect::Class("Map", 28, 0);
meta_class = new a8::reflect::Class("Map", 29, 0);
meta_class->SetSimpleField(0, "map_id", a8::reflect::ET_INT32, my_offsetof2(Map, map_id_));
meta_class->SetSimpleField(1, "template_list", a8::reflect::ET_STRING, my_offsetof2(Map, template_list_));
meta_class->SetSimpleField(2, "map_name", a8::reflect::ET_STRING, my_offsetof2(Map, map_name_));
@ -100,6 +100,7 @@ namespace mtb
meta_class->SetSimpleField(25, "ground_sampling_pos", a8::reflect::ET_STRING, my_offsetof2(Map, ground_sampling_pos_));
meta_class->SetSimpleField(26, "navmesh_file", a8::reflect::ET_STRING, my_offsetof2(Map, navmesh_file_));
meta_class->SetSimpleField(27, "moba_time", a8::reflect::ET_INT32, my_offsetof2(Map, moba_time_));
meta_class->SetSimpleField(28, "is_moba", a8::reflect::ET_INT32, my_offsetof2(Map, is_moba_));
}
return meta_class;
}

View File

@ -43,6 +43,7 @@ message Map
optional string ground_sampling_pos = 26;
optional string navmesh_file = 27;
optional int32 moba_time = 28;
optional int32 is_moba = 29;
}
message MapArea