1
This commit is contained in:
parent
615466a157
commit
20854df140
@ -20,10 +20,6 @@ MapService::MapService()
|
||||
|
||||
MapService::~MapService()
|
||||
{
|
||||
if (map_cells_) {
|
||||
free(map_cells_);
|
||||
map_cells_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void MapService::Init(int width, int height, int cell_width)
|
||||
@ -57,7 +53,20 @@ void MapService::Init(int width, int height, int cell_width)
|
||||
|
||||
void MapService::UnInit()
|
||||
{
|
||||
|
||||
for (int i = 0; i < max_grid_id_; ++i) {
|
||||
list_head* head = &map_cells_[i];
|
||||
while (!list_empty(head)) {
|
||||
CellNode* e = list_first_entry(head,
|
||||
CellNode,
|
||||
entry);
|
||||
list_del_init(&e->entry);
|
||||
delete e;
|
||||
}
|
||||
}
|
||||
if (map_cells_) {
|
||||
free(map_cells_);
|
||||
map_cells_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool MapService::CanAdd(const glm::vec3& pos, int rad)
|
||||
|
2
third_party/a8
vendored
2
third_party/a8
vendored
@ -1 +1 @@
|
||||
Subproject commit 1e577389c8a2870db9ddbf18577bfca24def049b
|
||||
Subproject commit 54fe50edf11dda774dcd6fc480134c9e4ce449cd
|
Loading…
x
Reference in New Issue
Block a user