Skip to content

Commit

Permalink
Merge pull request #6963 from StabbyCutyou/trigger_area_zoning_logic_…
Browse files Browse the repository at this point in the history
…updates

Relocate triggerarea zoning check
  • Loading branch information
zach2good authored Feb 6, 2025
2 parents aadc6f4 + c714e87 commit c096b9c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
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

0 comments on commit c096b9c

Please sign in to comment.