waypoint commands wip

This commit is contained in:
Aaron Kimbre
2023-08-09 21:37:36 -05:00
parent 5f7a108154
commit 1207d896a8
4 changed files with 120 additions and 4 deletions

View File

@@ -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.

View File

@@ -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 {