feat(world): an edit mode world constructs none of the zone's objects

With -editmode 1 the world loads the zone file, terrain scene map, navmesh and
level revisions, but makes no level objects, carver blockers, spawners, spawner
networks, triggers, vanity objects or live event objects. The zone control
object stays with the zone's own template, as the client makes the same one
itself (LevelManager::LoadZoneControlObject, 0x01082660); its server script
does nothing and a race track's does not take the player into a race. Such a
world lets in only accounts at editor_gm_level.

Plumbing only: no command starts an edit mode instance yet (docs/EditMode.md).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 17:34:13 -06:00
parent 4cf0909d52
commit f6914940c1
14 changed files with 219 additions and 14 deletions

View File

@@ -57,8 +57,7 @@ void dZoneManager::Initialize(const LWOZONEID& zoneID) {
EntityInfo info;
info.lot = zoneControlTemplate;
/* Yep its hardcoded like this in the client too, this exact value. */
info.id = 0x3FFF'FFFFFFFELL;
info.id = ZONE_CONTROL_OBJECT_ID;
Entity* zoneControl = Game::entityManager->CreateEntity(info, nullptr, nullptr, true);
m_ZoneControlObject = zoneControl;
@@ -73,7 +72,9 @@ void dZoneManager::Initialize(const LWOZONEID& zoneID) {
LOG("Zone prepared in: %llu ms", (endTime - startTime));
VanityUtilities::SpawnVanity();
// The vanity objects are server objects the client's editor would not know
if (!m_EditMode) VanityUtilities::SpawnVanity();
else LOG("Zone %i is in edit mode: no level objects, spawners, triggers or vanity objects were loaded", zoneID.GetMapID());
}
dZoneManager::~dZoneManager() {