1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
515 B

#pragma once
namespace AchievementFix
{
void Install()
{
REL::Relocation<std::uintptr_t> target;
if (REL::Module::IsVR()) {
target = REL::Offset(0x17FB90);
} else if (REL::Module::get().version() >= REL::Version(1, 6, 1130, 0)) {
// Checked: 1.6.1130
target = REL::ID(441528);
} else {
// Checked: 1.5.97, 1.6.640, 1.6.659
target = REL::RelocationID(13647, 13755);
}
std::uint8_t code[] = { 0xB0, 0x00, 0xC3, REL::NOP };
REL::safe_write(target.address(), code, sizeof(code));
}
}