added through breakable

This commit is contained in:
Bluub
2021-06-20 22:09:27 +02:00
parent 5d9fb5b09c
commit 14e1e2a6b3
5 changed files with 24 additions and 13 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ namespace BBM
void setPlayer(Vector3f pos);
//! @brief A star pathfinding between two points
std::vector<Vector2f> pathfind(Vector2f, Vector2f) const;
std::vector<Vector2f> pathfind(Vector2f root, Vector2f target, bool throughBreakable) const;
//! @brief find a safe space for current player
Vector2f findSafeSpace(const std::vector<std::vector<int>> &dangerMap) const;
@@ -95,7 +95,7 @@ namespace BBM
std::unordered_map<Vector2f, Vector2f> &cameFrom, Vector2f node) const;
//! @brief get neighbors of node for a_star
std::vector<Vector2f> getNeighbors(Vector2f node) const;
std::vector<Vector2f> getNeighbors(Vector2f node, bool throughBreakable) const;
std::vector<Vector2f> _dirs = {
Vector2f(1, 0), Vector2f(-1, 0), Vector2f(0, 1), Vector2f(0, -1)