Updated autosave system

This commit is contained in:
Eddoursul 2024-01-26 23:10:06 +01:00
parent b60feead3e
commit 1aae79648f
3 changed files with 6 additions and 2 deletions

View File

@ -89,12 +89,16 @@ namespace Papyrus::PapyrusFunctions
sstream << StringToHex(RE::PlayerCharacter::GetSingleton()->GetName()).c_str();
sstream << "_";
// TODO: Add cell names and delete old copies, current implementation breaks rotation
/*
RE::TESObjectCELL* parentCell = RE::PlayerCharacter::GetSingleton()->parentCell;
if (parentCell->IsInteriorCell()) {
sstream << parentCell->GetFormEditorID();
} else {
sstream << RE::PlayerCharacter::GetSingleton()->GetWorldspace()->GetFormEditorID();
}
*/
sstream << "Vyn";
sstream << "_000000_00000000000000_1_1";

View File

@ -4,11 +4,11 @@ Event OnUpdate()
Actor PlayerREF = Game.GetForm(0x14) as Actor
if PlayerREF.IsDead() || ! PlayerREF.GetParentCell()
if PlayerREF.IsDead()
return
endif
If PlayerREF.IsInCombat() || PlayerREF.IsOnMount() || PlayerREF.IsSwimming() || ! Game.IsFightingControlsEnabled() || Utility.IsInMenuMode() || UI.IsTextInputEnabled() || UI.IsMenuOpen("Dialogue Menu")
If PlayerREF.IsInCombat() || PlayerREF.IsOnMount() || PlayerREF.IsSwimming() || ! Game.IsFightingControlsEnabled() || Utility.IsInMenuMode() || UI.IsTextInputEnabled() || UI.IsMenuOpen("Dialogue Menu") || ! PlayerREF.GetParentCell()
RegisterForSingleUpdate(5)
return
endif