From 9d620a20a0d1fa6af8b6af044610563a7af77712 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Sat, 13 Jun 2015 16:09:43 -0500 Subject: Work on NetherPortalScanner. Setup portal scanner to reset PortalCooldown. Changed where player is spawned. Added a_InitSpawn flag to CreateAndInitializeWorld. --- src/Root.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Root.cpp') diff --git a/src/Root.cpp b/src/Root.cpp index a84a3db57..f49f67337 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -342,7 +342,7 @@ void cRoot::LoadWorlds(cSettingsRepositoryInterface & a_Settings) -cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension, const AString & a_OverworldName) +cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension a_Dimension, const AString & a_OverworldName, bool a_InitSpawn) { cWorld * World = m_WorldsByName[a_WorldName]; if (World != nullptr) @@ -353,7 +353,10 @@ cWorld * cRoot::CreateAndInitializeWorld(const AString & a_WorldName, eDimension cWorld * NewWorld = new cWorld(a_WorldName.c_str(), a_Dimension, a_OverworldName); m_WorldsByName[a_WorldName] = NewWorld; NewWorld->Start(); - NewWorld->InitializeSpawn(); + if (a_InitSpawn) + { + NewWorld->InitializeSpawn(); + } m_PluginManager->CallHookWorldStarted(*NewWorld); return NewWorld; } -- cgit v1.2.3