1
This commit is contained in:
parent
e40397fa60
commit
d0ee13ac0a
@ -3,6 +3,11 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
|
#include "DetourNavMeshBuilder.h"
|
||||||
|
#include "DetourNavMeshQuery.h"
|
||||||
|
#include "DetourCommon.h"
|
||||||
|
#include "DetourNavMesh.h"
|
||||||
|
|
||||||
#include "mapservice.h"
|
#include "mapservice.h"
|
||||||
#include "collider.h"
|
#include "collider.h"
|
||||||
#include "entity.h"
|
#include "entity.h"
|
||||||
@ -33,6 +38,10 @@ MapService::~MapService()
|
|||||||
free(map_cells_);
|
free(map_cells_);
|
||||||
map_cells_ = nullptr;
|
map_cells_ = nullptr;
|
||||||
}
|
}
|
||||||
|
if (navmesh_) {
|
||||||
|
dtFreeNavMesh(navmesh_);
|
||||||
|
navmesh_ = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapService::Init(int width, int height, int cell_width)
|
void MapService::Init(int width, int height, int cell_width)
|
||||||
|
@ -54,6 +54,7 @@ struct FindPathStatus
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Room;
|
class Room;
|
||||||
|
class dtNavMesh;
|
||||||
class MapService
|
class MapService
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -87,6 +88,7 @@ class MapService
|
|||||||
bool IsValidPos(int x, int y);
|
bool IsValidPos(int x, int y);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
dtNavMesh* navmesh_ = nullptr;
|
||||||
list_head* map_cells_ = nullptr;
|
list_head* map_cells_ = nullptr;
|
||||||
int map_width_ = 0;
|
int map_width_ = 0;
|
||||||
int map_height_ = 0;
|
int map_height_ = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user