1

Check the home keyword in BGSActorCellEvent

This commit is contained in:
Eddoursul 2022-07-01 22:58:02 +02:00
parent 1ca711df36
commit 5fa614bf94
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -184,8 +184,9 @@ namespace ArtifactTracker
void OnCellEnter(RE::FormID a_formID) void OnCellEnter(RE::FormID a_formID)
{ {
RE::TESObjectCELL* cell = RE::TESForm::LookupByID<RE::TESObjectCELL>(a_formID); RE::TESObjectCELL* cell = RE::TESForm::LookupByID<RE::TESObjectCELL>(a_formID);
RE::BGSLocation* location = cell ? cell->GetLocation() : nullptr;
if (!cell || !cell->IsInteriorCell()) { if (!cell || !cell->IsInteriorCell() || !location || !location->HasKeyword(g_homeKeyword)) {
if (IsHome()) { if (IsHome()) {
RE::ScriptEventSourceHolder::GetSingleton()->RemoveEventSink<RE::TESCellFullyLoadedEvent>(EventListener::GetSingleton()); RE::ScriptEventSourceHolder::GetSingleton()->RemoveEventSink<RE::TESCellFullyLoadedEvent>(EventListener::GetSingleton());
ToggleHomeMode(nullptr); ToggleHomeMode(nullptr);