1
This commit is contained in:
parent
5d3979e30c
commit
07a6288cf0
@ -59,10 +59,16 @@ void MapInstance::Init()
|
||||
if (current_uniid_ >= FIXED_OBJECT_MAXID) {
|
||||
A8_ABORT();
|
||||
}
|
||||
{
|
||||
navmesh_ = dtAllocNavMesh();
|
||||
}
|
||||
}
|
||||
|
||||
void MapInstance::UnInit()
|
||||
{
|
||||
dtFreeNavMesh(navmesh_);
|
||||
navmesh_ = nullptr;
|
||||
|
||||
map_service_->UnInit();
|
||||
grid_service_->UnInit();
|
||||
A8_SAFE_DELETE(map_service_);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "DetourNavMesh.h"
|
||||
|
||||
namespace MetaData
|
||||
{
|
||||
struct Map;
|
||||
@ -31,6 +33,7 @@ class MapInstance
|
||||
MetaData::Map* GetMapMeta() { return map_meta_; }
|
||||
Entity* GetEntityByUniId(int uniid);
|
||||
a8::Vec2* GetSpawnPoint(const std::string& name);
|
||||
dtNavMesh* GetNavMesh() { return navmesh_; };
|
||||
|
||||
private:
|
||||
void CreateThings();
|
||||
@ -48,6 +51,8 @@ class MapInstance
|
||||
int AllocUniid();
|
||||
|
||||
private:
|
||||
dtNavMesh* navmesh_ = nullptr;
|
||||
|
||||
int current_uniid_ = 0;
|
||||
int current_map_block_uniid_ = 0;
|
||||
std::map<int, Entity*> uniid_hash_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user