Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate triggerarea zoning check #6963

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/map/lua/luautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CLuaInstance> optInstance = std::nullopt;
if (PChar->PInstance)
Expand Down
6 changes: 6 additions & 0 deletions src/map/zone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions src/map/zone_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down