diff --git a/src/map/lua/luautils.cpp b/src/map/lua/luautils.cpp index 2884a8ac9bf..300c28f5c69 100644 --- a/src/map/lua/luautils.cpp +++ b/src/map/lua/luautils.cpp @@ -2001,12 +2001,6 @@ namespace luautils { TracyZoneScoped; - // Do not enter trigger areas while loading in. Set in xi.player.onGameIn - if (PChar->GetLocalVar("ZoningIn") > 0) - { - return; - } - std::string filename; std::optional optInstance = std::nullopt; if (PChar->PInstance) diff --git a/src/map/zone.cpp b/src/map/zone.cpp index f70b14bf964..17c693b7081 100644 --- a/src/map/zone.cpp +++ b/src/map/zone.cpp @@ -1224,6 +1224,12 @@ void CZone::CheckTriggerAreas() // TODO: When we start to use octrees or spatial hashing to split up zones, // : use them here to make the search domain smaller. + // Do not enter trigger areas while loading in. Set in xi.player.onGameIn + if (PChar->GetLocalVar("ZoningIn") > 0) + { + return; + } + for (const auto& triggerArea : m_triggerAreaList) { const auto triggerAreaID = triggerArea->getTriggerAreaID(); diff --git a/src/map/zone_instance.cpp b/src/map/zone_instance.cpp index 84b7dce749e..a167945d5e1 100644 --- a/src/map/zone_instance.cpp +++ b/src/map/zone_instance.cpp @@ -423,6 +423,12 @@ void CZoneInstance::CheckTriggerAreas() // TODO: When we start to use octrees or spatial hashing to split up zones, // : use them here to make the search domain smaller. + // Do not enter trigger areas while loading in. Set in xi.player.onGameIn + if (PChar->GetLocalVar("ZoningIn") > 0) + { + return; + } + for (const auto& triggerArea : m_triggerAreaList) { const auto triggerAreaID = triggerArea->getTriggerAreaID();