add pathfinding.set_avoided_tags

This commit is contained in:
MihailRis
2025-08-31 15:52:23 +03:00
parent 5204cfedf5
commit 5e3373313b
7 changed files with 46 additions and 12 deletions
+4 -2
View File
@@ -6,6 +6,7 @@
#include <glm/vec3.hpp>
#include <memory>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -60,6 +61,7 @@ namespace voxels {
glm::ivec3 target;
Route route;
State state {};
std::set<int> avoidTags;
};
class Pathfinding {
@@ -84,8 +86,8 @@ namespace voxels {
std::unordered_map<int, Agent> agents;
int nextAgent = 1;
int getSurfaceAt(const glm::ivec3& pos, int maxDelta);
int getSurfaceAt(const Agent& agent, const glm::ivec3& pos, int maxDelta);
int checkPoint(int x, int y, int z);
int checkPoint(const Agent& agent, int x, int y, int z);
};
}