Fixed crash when loading a save with missing plugins
This commit is contained in:
parent
ae35ac9fbb
commit
654067f863
Binary file not shown.
@ -6,7 +6,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
|
|||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
project(
|
project(
|
||||||
ArtifactTracker
|
ArtifactTracker
|
||||||
VERSION 1.0.6
|
VERSION 1.0.7
|
||||||
DESCRIPTION "Artifact Tracker"
|
DESCRIPTION "Artifact Tracker"
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
@ -65,11 +65,12 @@ auto EventListener::ProcessEvent(
|
|||||||
RE::BSTEventSource<RE::TESCellFullyLoadedEvent>* a_eventSource)
|
RE::BSTEventSource<RE::TESCellFullyLoadedEvent>* a_eventSource)
|
||||||
-> RE::BSEventNotifyControl
|
-> RE::BSEventNotifyControl
|
||||||
{
|
{
|
||||||
|
if (a_event->cell) {
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
SKSE::log::info("TESCellFullyLoadedEvent");
|
SKSE::log::info("TESCellFullyLoadedEvent");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ArtifactTracker::OnCellEnter(a_event->cell->GetLocation(), a_event->cell);
|
ArtifactTracker::OnCellEnter(a_event->cell->GetLocation(), a_event->cell);
|
||||||
|
}
|
||||||
|
|
||||||
return RE::BSEventNotifyControl::kContinue;
|
return RE::BSEventNotifyControl::kContinue;
|
||||||
}
|
}
|
||||||
|
@ -38,14 +38,16 @@ namespace {
|
|||||||
}
|
}
|
||||||
} else if (message->type == MessagingInterface::kPreLoadGame) {
|
} else if (message->type == MessagingInterface::kPreLoadGame) {
|
||||||
ArtifactTracker::g_bSaveLoaded = false; // block cell load events
|
ArtifactTracker::g_bSaveLoaded = false; // block cell load events
|
||||||
} else if (message->type == MessagingInterface::kPostLoadGame) {
|
} else if (message->type == MessagingInterface::kPostLoadGame && message->data) {
|
||||||
SKSE::GetTaskInterface()->AddTask([]() {
|
const auto cell = RE::PlayerCharacter::GetSingleton()->GetParentCell();
|
||||||
|
if (cell) {
|
||||||
|
SKSE::GetTaskInterface()->AddTask([cell]() {
|
||||||
ArtifactTracker::OnGameLoad(); // save-specific updates
|
ArtifactTracker::OnGameLoad(); // save-specific updates
|
||||||
ArtifactTracker::g_bSaveLoaded = true;
|
ArtifactTracker::g_bSaveLoaded = true;
|
||||||
const auto cell = RE::PlayerCharacter::GetSingleton()->GetParentCell();
|
|
||||||
ArtifactTracker::OnCellEnter(cell->GetLocation(), cell);
|
ArtifactTracker::OnCellEnter(cell->GetLocation(), cell);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
||||||
"name": "artifact-tracker",
|
"name": "artifact-tracker",
|
||||||
"version-string": "1.0.6",
|
"version-string": "1.0.7",
|
||||||
"port-version": 0,
|
"port-version": 0,
|
||||||
"description": "Artifact Tracker",
|
"description": "Artifact Tracker",
|
||||||
"homepage": "https://eddoursul.win/mods/artifact-tracker/",
|
"homepage": "https://eddoursul.win/mods/artifact-tracker/",
|
||||||
|
Loading…
Reference in New Issue
Block a user