Added an achievement fix 1.5.97-1.6.1130
This commit is contained in:
parent
9d84b0bb74
commit
8a4e3ef71b
BIN
SKSE/Plugins/EnderalSE.dll
(Stored with Git LFS)
BIN
SKSE/Plugins/EnderalSE.dll
(Stored with Git LFS)
Binary file not shown.
@ -1,3 +1,4 @@
|
|||||||
FlatMapMarkers = true
|
FlatMapMarkers = true
|
||||||
StayAtSystemPage = true
|
StayAtSystemPage = true
|
||||||
MapMarkerPlacementFixes = true
|
MapMarkerPlacementFixes = true
|
||||||
|
AchievementFix = true
|
||||||
|
20
source/Enderal DLL/src/AchievementFix.h
Normal file
20
source/Enderal DLL/src/AchievementFix.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace AchievementFix
|
||||||
|
{
|
||||||
|
constexpr std::uint8_t NOP{ 0x90 };
|
||||||
|
|
||||||
|
void Install()
|
||||||
|
{
|
||||||
|
REL::Relocation<std::uintptr_t> target;
|
||||||
|
|
||||||
|
if (GetLoadInterface()->RuntimeVersion().minor() > 6 || GetLoadInterface()->RuntimeVersion().patch() >= 1130) {
|
||||||
|
target = REL::ID(441528);
|
||||||
|
} else {
|
||||||
|
target = REL::RelocationID(13647, 13755);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::uint8_t code[] = { 0xB0, 0x00, 0xC3, NOP };
|
||||||
|
REL::safe_write(target.address(), code, 4);
|
||||||
|
}
|
||||||
|
}
|
@ -4,13 +4,15 @@
|
|||||||
#include "FlatMapMarkers.h"
|
#include "FlatMapMarkers.h"
|
||||||
#include "StayAtSystemPage.h"
|
#include "StayAtSystemPage.h"
|
||||||
#include "MapMarkerPlacement.h"
|
#include "MapMarkerPlacement.h"
|
||||||
|
#include "AchievementFix.h"
|
||||||
|
|
||||||
using namespace SKSE;
|
using namespace SKSE;
|
||||||
|
|
||||||
static std::map<std::string, bool> g_settings{
|
static std::map<std::string, bool> g_settings{
|
||||||
{ "FlatMapMarkers", true },
|
{ "FlatMapMarkers", true },
|
||||||
{ "StayAtSystemPage", true },
|
{ "StayAtSystemPage", true },
|
||||||
{ "MapMarkerPlacementFixes", true }
|
{ "MapMarkerPlacementFixes", true },
|
||||||
|
{ "AchievementFix", true }
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -150,6 +152,11 @@ SKSEPluginLoad(const LoadInterface* skse) {
|
|||||||
|
|
||||||
GetPapyrusInterface()->Register(Papyrus::Bind);
|
GetPapyrusInterface()->Register(Papyrus::Bind);
|
||||||
|
|
||||||
|
if (g_settings.at("AchievementFix")) {
|
||||||
|
logger::info("Patching achievements...");
|
||||||
|
AchievementFix::Install();
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsVR()) {
|
if (!IsVR()) {
|
||||||
if (g_settings.at("FlatMapMarkers")) {
|
if (g_settings.at("FlatMapMarkers")) {
|
||||||
logger::info("Initializing Flat Map Markers...");
|
logger::info("Initializing Flat Map Markers...");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user