mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 15:57:13 +00:00
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:
@@ -98,6 +98,11 @@ CppScripts::Script* const ScriptComponent::GetScript() {
|
||||
void ScriptComponent::SetScript(const std::string& scriptName) {
|
||||
// Scripts are managed by the CppScripts class and are effecitvely singletons
|
||||
// and they may also be used by other script components so DON'T delete them.
|
||||
// Edit mode (docs/EditMode.md): the zone control object stays, its zone script does not run
|
||||
if (Game::zoneManager && Game::zoneManager->GetEditMode() && m_Parent->GetObjectID() == dZoneManager::ZONE_CONTROL_OBJECT_ID) {
|
||||
m_Script = CppScripts::GetInvalidScript();
|
||||
return;
|
||||
}
|
||||
m_Script = CppScripts::GetScript(m_Parent, scriptName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user