Add support to reload the config (#868)

This commit is contained in:
David Markowitz
2022-12-04 14:25:58 -08:00
committed by GitHub
parent de3e53de6c
commit e8ba3357e8
11 changed files with 150 additions and 66 deletions

View File

@@ -23,6 +23,15 @@ public:
void Update(float deltaTime);
/**
* Sets the delete grid parameter to value. When false, the grid will not clean up memory.
*
* @param value Whether or not to delete entities on deletion of the grid.
*/
void SetDeleteGrid(bool value) { this->m_DeleteGrid = value; };
std::vector<std::vector<std::forward_list<dpEntity*>>> GetCells() { return this->m_Cells; };
private:
void HandleEntity(dpEntity* entity, dpEntity* other);
void HandleCell(int x, int z, float deltaTime);
@@ -31,4 +40,5 @@ private:
//cells on X, cells on Y for that X, then another vector that contains the entities within that cell.
std::vector<std::vector<std::forward_list<dpEntity*>>> m_Cells;
std::map<LWOOBJID, dpEntity*> m_GargantuanObjects;
bool m_DeleteGrid = true;
};