mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 00:07:13 +00:00
revert(world): the edit mode world
This reverts commit f6914940. The client's level editor builds a zone's objects
itself from its own files, so a world server that constructs none of them has no use.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ Level::Level(Zone* parentZone, const std::string& filepath, int32_t sceneID) {
|
||||
static_cast<LevelFile::ChunkHeader&>(header) = chunkHeader;
|
||||
m_ChunkHeaders.insert(std::make_pair(id, header));
|
||||
}
|
||||
LoadSceneObjects(levelFile.objects, m_SceneID);
|
||||
LoadSceneObjects(levelFile.objects);
|
||||
}
|
||||
|
||||
void Level::MakeSpawner(const SceneObject& obj, int32_t sceneID) {
|
||||
@@ -120,18 +120,7 @@ void Level::MakeSpawner(const SceneObject& obj, int32_t sceneID) {
|
||||
Game::zoneManager->MakeSpawner(spawnInfo);
|
||||
}
|
||||
|
||||
void Level::LoadSceneObjects(const std::vector<SceneObject>& objects, const int32_t sceneID) {
|
||||
// Edit mode: the GM's client has the level's objects from its own files, so none is made here. The oldest files
|
||||
// keep the spawn point in an object, which is still read.
|
||||
if (Game::zoneManager->GetEditMode()) {
|
||||
for (const auto& obj : objects) {
|
||||
if (obj.lot != LOT_MARKER_PLAYER_START) continue;
|
||||
Game::zoneManager->GetZoneMut()->SetSpawnPos(obj.position);
|
||||
Game::zoneManager->GetZoneMut()->SetSpawnRot(obj.rotation);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void Level::LoadSceneObjects(const std::vector<SceneObject>& objects) {
|
||||
CDFeatureGatingTable* featureGatingTable = CDClientManager::GetTable<CDFeatureGatingTable>();
|
||||
|
||||
CDFeatureGating gating;
|
||||
@@ -192,7 +181,7 @@ void Level::LoadSceneObjects(const std::vector<SceneObject>& objects, const int3
|
||||
}
|
||||
|
||||
if (obj.lot == 176) { //Spawner
|
||||
MakeSpawner(obj, sceneID);
|
||||
MakeSpawner(obj, m_SceneID);
|
||||
} else { //Regular object
|
||||
EntityInfo info;
|
||||
info.spawnerID = 0;
|
||||
@@ -202,7 +191,7 @@ void Level::LoadSceneObjects(const std::vector<SceneObject>& objects, const int3
|
||||
info.rot = obj.rotation;
|
||||
info.settings = obj.settings;
|
||||
info.scale = obj.scale;
|
||||
info.scene = sceneID;
|
||||
info.scene = m_SceneID;
|
||||
Game::entityManager->CreateEntity(info);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user