This commit is contained in:
aozhiwei 2023-05-14 16:26:48 +08:00
parent 8ef59c6030
commit b68a232135
3 changed files with 11 additions and 1 deletions

View File

@ -126,7 +126,7 @@ namespace mc
{ {
node->name node->name
}); });
childs[node->name] = node; childs[a8::Format("%s_%d", {node->name, i + 1})] = node;
#else #else
A8_ABORT(); A8_ABORT();
#endif #endif

View File

@ -196,7 +196,9 @@ void MapService::AddTriangle(mc::Triangle* tri)
//A8_ABORT(); //A8_ABORT();
} }
if (max_grid_y >= map_height_) { if (max_grid_y >= map_height_) {
#if 0
A8_ABORT(); A8_ABORT();
#endif
max_grid_y = map_height_ - 1; max_grid_y = map_height_ - 1;
} }
float tri_verts[3 * 3]; float tri_verts[3 * 3];

View File

@ -29,14 +29,22 @@ namespace mt
void MapCollider::LoadAll() void MapCollider::LoadAll()
{ {
std::vector<std::string> files = { std::vector<std::string> files = {
#ifdef DEBUG
"main3d_map.colliders.new.json"
#else
"main3d_map.colliders.json" "main3d_map.colliders.json"
#endif
}; };
for (auto& filename : files) { for (auto& filename : files) {
MapCollider* p = new MapCollider(); MapCollider* p = new MapCollider();
p->Load(filename); p->Load(filename);
p->LoadTerrain("map4_terrain.bin"); p->LoadTerrain("map4_terrain.bin");
raw_list.push_back(p); raw_list.push_back(p);
#ifdef DEBUG
name_hash["main3d_map.colliders.json"] = p;
#else
name_hash[filename] = p; name_hash[filename] = p;
#endif
} }
} }