mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-22 14:44:22 +00:00
feat: add eSceneType enum, filter scene graph to general scenes, zone parsing improvements
- Add eSceneType enum (General, Audio) replacing raw uint32_t in SceneRef - Filter BuildSceneGraph to only include General scenes - Skip transitions referencing non-general scenes in adjacency graph - Rename SceneRef unknown fields to scenePosition/sceneRadius - Zone parsing and Level improvements Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,13 +22,18 @@ struct WaypointCommand {
|
||||
};
|
||||
|
||||
|
||||
enum class eSceneType : uint32_t {
|
||||
General = 0,
|
||||
Audio = 1,
|
||||
};
|
||||
|
||||
struct SceneRef {
|
||||
std::string filename;
|
||||
uint32_t id{};
|
||||
uint32_t sceneType{}; //0 = general, 1 = audio?
|
||||
eSceneType sceneType{};
|
||||
std::string name;
|
||||
NiPoint3 unknown1;
|
||||
float unknown2{};
|
||||
NiPoint3 scenePosition; // version 33 only: editor bounding sphere center
|
||||
float sceneRadius{}; // version 33 only: editor bounding sphere radius
|
||||
uint8_t color_r{};
|
||||
uint8_t color_g{};
|
||||
uint8_t color_b{};
|
||||
@@ -36,8 +41,17 @@ struct SceneRef {
|
||||
std::map<uint32_t, LUTriggers::Trigger*> triggers;
|
||||
};
|
||||
|
||||
struct ZoneBoundary {
|
||||
NiPoint3 normal;
|
||||
NiPoint3 point;
|
||||
uint16_t destMapID{};
|
||||
uint16_t destInstanceID{};
|
||||
uint32_t destSceneID{};
|
||||
NiPoint3 spawnLocation;
|
||||
};
|
||||
|
||||
struct SceneTransitionInfo {
|
||||
uint64_t sceneID{}; //id of the scene being transitioned to.
|
||||
LWOSCENEID sceneID;
|
||||
NiPoint3 position;
|
||||
};
|
||||
|
||||
@@ -232,6 +246,7 @@ public:
|
||||
const Raw::Raw& GetZoneRaw() const { return m_Raw; }
|
||||
const Raw::TerrainMesh& GetTerrainMesh() const { return m_TerrainMesh; }
|
||||
const SceneRef* GetScene(LWOSCENEID sceneID) const;
|
||||
const std::vector<ZoneBoundary>& GetBoundaries() const { return m_Boundaries; }
|
||||
const std::vector<SceneTransition>& GetSceneTransitions() const { return m_SceneTransitions; }
|
||||
const std::map<LWOSCENEID, SceneRef>& GetScenes() const { return m_Scenes; }
|
||||
|
||||
@@ -255,6 +270,7 @@ private:
|
||||
Raw::TerrainMesh m_TerrainMesh; // Pre-generated terrain mesh for fast scene lookups
|
||||
|
||||
std::map<LWOSCENEID, SceneRef> m_Scenes;
|
||||
std::vector<ZoneBoundary> m_Boundaries;
|
||||
std::vector<SceneTransition> m_SceneTransitions;
|
||||
|
||||
uint32_t m_PathDataLength;
|
||||
|
||||
Reference in New Issue
Block a user