This commit is contained in:
aozhiwei 2022-12-25 13:49:03 +08:00
parent 4740fd7662
commit 7c2c7edc67
2 changed files with 3 additions and 4 deletions

View File

@ -15,6 +15,7 @@
#include "mapmgr.h" #include "mapmgr.h"
#include "room.h" #include "room.h"
#include "entityfactory.h" #include "entityfactory.h"
#include "mt/MetaMgr.h"
#include "mt/Param.h" #include "mt/Param.h"
#include "mt/Map.h" #include "mt/Map.h"
@ -83,9 +84,7 @@ void MapInstance::Init()
} }
{ {
navmesh_ = dtAllocNavMesh(); navmesh_ = dtAllocNavMesh();
// 111 FILE *fp = fopen((mt::MetaMgr::Instance()->GetResDir() + "map3.bin").c_str(), "rb");
#if 0
FILE *fp = fopen((MetaMgr::Instance()->GetResDir() + "map3.bin").c_str(), "rb");
if(fp){ if(fp){
//fseek(fp, 0, SEEK_END); //fseek(fp, 0, SEEK_END);
//int file_size = ftell(fp); //int file_size = ftell(fp);
@ -160,7 +159,6 @@ void MapInstance::Init()
} }
fclose(fp); fclose(fp);
} }
#endif
} }
navmesh_query_ = new dtNavMeshQuery(); navmesh_query_ = new dtNavMeshQuery();
navmesh_query_->init(navmesh_, 1024); navmesh_query_->init(navmesh_, 1024);

View File

@ -131,6 +131,7 @@ namespace mt
return p; return p;
} }
const std::string GetResDir() { return res_path_; }
private: private:
std::vector<MetaTable*> meta_tables; std::vector<MetaTable*> meta_tables;
std::string res_path_; std::string res_path_;