mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
add pathfinding.set_avoided_tags
This commit is contained in:
parent
5204cfedf5
commit
5e3373313b
7 changed files with 46 additions and 12 deletions
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue