mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-28 17:01:39 +00:00
The client keeps the scene under the player loaded, the scenes the zone file's transitions connect to it, and the global scene (the client's scene streaming and terrain scene lookup the client's terrain scene lookup and connected scenes; transitions naming a missing scene dropped as the client does). - ZoneScenes (dCommon): the terrain's scene map lookup and the scene graph, shared by the world server and the dashboard. - Objects remember the scene they were placed in (spawners pass theirs on). - ghosting_scenes=1 (world config, off by default): players get the objects of their loaded scenes instead of the ones within the ghosting distances; objects from no scene go by the scene under them. Zones without a scene map keep distance ghosting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
742 B
C++
31 lines
742 B
C++
#pragma once
|
|
#include "dZMCommon.h"
|
|
#include <map>
|
|
#include <iostream>
|
|
#include "Zone.h"
|
|
#include "LevelFile.h"
|
|
|
|
class Level {
|
|
public:
|
|
using ChunkTypeID = LevelFile::ChunkTypeID;
|
|
using FileInfoChunk = LevelFile::FileInfoChunk;
|
|
|
|
struct Header : LevelFile::ChunkHeader {
|
|
LWOSCENEID lwoSceneID;
|
|
};
|
|
|
|
public:
|
|
// sceneID: the scene id of the zone scene the file is (EntityInfo::scene of its objects)
|
|
Level(Zone* parentZone, const std::string& filepath, int32_t sceneID = -1);
|
|
|
|
static void MakeSpawner(const SceneObject& obj, int32_t sceneID = -1);
|
|
|
|
std::map<uint32_t, Header> m_ChunkHeaders;
|
|
private:
|
|
Zone* m_ParentZone;
|
|
int32_t m_SceneID = -1;
|
|
|
|
//private functions:
|
|
void LoadSceneObjects(const std::vector<SceneObject>& objects);
|
|
};
|