mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-20 03:20:03 +00:00
Update to new path schema + add NPCPath struct
This commit is contained in:
@@ -8,6 +8,8 @@ const int SLIDER_SPEED = 1200;
|
||||
const int SLIDER_STOP_TICKS = 16;
|
||||
const int SLIDER_GAP_SIZE = 45000;
|
||||
|
||||
const int NPC_DEFAULT_SPEED = 300;
|
||||
|
||||
struct Vec3 {
|
||||
int x, y, z;
|
||||
};
|
||||
@@ -24,9 +26,19 @@ struct TransportLocation {
|
||||
int npcID, x, y, z;
|
||||
};
|
||||
|
||||
struct NPCPath {
|
||||
std::vector<Vec3> points;
|
||||
std::vector<int32_t> targetIDs;
|
||||
std::vector<int32_t> targetTypes;
|
||||
int speed;
|
||||
int escortTaskID;
|
||||
bool isRelative;
|
||||
};
|
||||
|
||||
namespace Transport {
|
||||
extern std::map<int32_t, TransportRoute> Routes;
|
||||
extern std::map<int32_t, TransportLocation> Locations;
|
||||
extern std::vector<NPCPath> NPCPaths; // predefined NPC paths
|
||||
extern std::map<int32_t, std::queue<Vec3>> SkywayPaths; // predefined skyway paths with points
|
||||
extern std::unordered_map<CNSocket*, std::queue<Vec3>> SkywayQueues; // player sockets with queued broomstick points
|
||||
extern std::unordered_map<int32_t, std::queue<Vec3>> NPCQueues; // NPC ids with queued pathing points
|
||||
|
||||
Reference in New Issue
Block a user