1
This commit is contained in:
parent
dd92b0e4bb
commit
e0e13696e2
@ -92,11 +92,6 @@ void MapInstance::Init()
|
|||||||
map_service_->Init(map_meta_->map_width() / MAP_GRID_WIDTH,
|
map_service_->Init(map_meta_->map_width() / MAP_GRID_WIDTH,
|
||||||
map_meta_->map_height() / MAP_GRID_WIDTH,
|
map_meta_->map_height() / MAP_GRID_WIDTH,
|
||||||
MAP_GRID_WIDTH);
|
MAP_GRID_WIDTH);
|
||||||
f8::UdpLog::Instance()->Info
|
|
||||||
("map_id:%d",
|
|
||||||
{
|
|
||||||
map_id
|
|
||||||
});
|
|
||||||
{
|
{
|
||||||
navmesh_ = dtAllocNavMesh();
|
navmesh_ = dtAllocNavMesh();
|
||||||
FILE *fp = fopen((mt::MetaMgr::Instance()->GetResDir() + "map4.bin").c_str(), "rb");
|
FILE *fp = fopen((mt::MetaMgr::Instance()->GetResDir() + "map4.bin").c_str(), "rb");
|
||||||
@ -180,6 +175,12 @@ void MapInstance::Init()
|
|||||||
MarkMapAreaPolys();
|
MarkMapAreaPolys();
|
||||||
MarkConnectablePolys();
|
MarkConnectablePolys();
|
||||||
LoadHouse();
|
LoadHouse();
|
||||||
|
f8::UdpLog::Instance()->Info
|
||||||
|
("map_id:%d connectable_polys:%d",
|
||||||
|
{
|
||||||
|
map_id,
|
||||||
|
connectable_polys_.size()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapInstance::UnInit()
|
void MapInstance::UnInit()
|
||||||
@ -1200,7 +1201,7 @@ void MapInstance::MarkConnectablePolys()
|
|||||||
{
|
{
|
||||||
dtPolyRef startRef = INVALID_NAVMESH_POLYREF;
|
dtPolyRef startRef = INVALID_NAVMESH_POLYREF;
|
||||||
{
|
{
|
||||||
glm::vec3 pos;
|
glm::vec3 pos = glm::vec3(5120.000000000000f, 6.250846862793f, 5120.000000000000f);
|
||||||
|
|
||||||
dtQueryFilter filter;
|
dtQueryFilter filter;
|
||||||
filter.setIncludeFlags(0xffff);
|
filter.setIncludeFlags(0xffff);
|
||||||
@ -1245,5 +1246,4 @@ void MapInstance::MarkConnectablePolys()
|
|||||||
connectable_polys_.insert(neighbour_ref);
|
connectable_polys_.insert(neighbour_ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user