mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
waypoint commands wip
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "eTriggerCommandType.h"
|
||||
#include "eTriggerEventType.h"
|
||||
#include "eWaypointCommandType.h"
|
||||
|
||||
Zone::Zone(const LWOMAPID& mapID, const LWOINSTANCEID& instanceID, const LWOCLONEID& cloneID) :
|
||||
m_ZoneID(mapID, instanceID, cloneID) {
|
||||
@@ -537,16 +538,16 @@ void Zone::LoadPath(std::istream& file) {
|
||||
|
||||
LDFBaseData* ldfConfig = nullptr;
|
||||
if (path.pathType == PathType::Movement || path.pathType == PathType::Rail) {
|
||||
ldfConfig = LDFBaseData::DataFromString(parameter + "=0:" + value);
|
||||
waypoint.commands.push_back(WaypointCommand(WaypointCommandType::StringToWaypointCommandType(parameter), value));
|
||||
} else {
|
||||
ldfConfig = LDFBaseData::DataFromString(parameter + "=" + value);
|
||||
if (ldfConfig) waypoint.config.push_back(ldfConfig);
|
||||
}
|
||||
if (ldfConfig) waypoint.config.push_back(ldfConfig);
|
||||
}
|
||||
}
|
||||
|
||||
// We verify the waypoint heights against the navmesh because in many movement paths,
|
||||
// the waypoint is located near 0 height,
|
||||
// the waypoint is located near 0 height,
|
||||
if (path.pathType == PathType::Movement) {
|
||||
if (dpWorld::Instance().IsLoaded()) {
|
||||
// 2000 should be large enough for every world.
|
||||
|
@@ -13,6 +13,16 @@ namespace LUTriggers {
|
||||
|
||||
class Level;
|
||||
|
||||
enum class eWaypointCommandType : uint32_t;
|
||||
struct WaypointCommand {
|
||||
eWaypointCommandType command;
|
||||
std::string data;
|
||||
WaypointCommand(eWaypointCommandType command, std::string data){
|
||||
this->command = command;
|
||||
this->data = data;
|
||||
}
|
||||
};
|
||||
|
||||
struct SceneRef {
|
||||
std::string filename;
|
||||
uint32_t id;
|
||||
@@ -69,6 +79,7 @@ struct PathWaypoint {
|
||||
RacingPathWaypoint racing;
|
||||
RailPathWaypoint rail;
|
||||
std::vector<LDFBaseData*> config;
|
||||
std::vector<WaypointCommand> commands;
|
||||
};
|
||||
|
||||
enum class PathType : uint32_t {
|
||||
|
Reference in New Issue
Block a user