4
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.
 
 
 

20 lines
687 B

#pragma once
#include "Util.h"
// Based on Ryan McKenzie's Flat Map Markers
namespace FlatMapMarkers
{
inline void Hook_WorldPtToScreenPt3(RE::NiCamera* a_camera, RE::NiPoint3& a_in, float& a_xOut, float& a_yOut, float& a_zOut, float a_zeroTolerance)
{
a_in.z = 100000.156250;
RE::NiCamera::WorldPtToScreenPt3(a_camera->GetRuntimeData().worldToCam, a_camera->GetRuntimeData2().port, a_in, a_xOut, a_yOut, a_zOut, a_zeroTolerance);
}
inline void Install()
{
REL::Relocation<std::uintptr_t> offset{ RELOCATION_ID(52224, 53111), IsSE() ? 0x22F : 0x21F };
auto& trampoline = SKSE::GetTrampoline();
trampoline.write_call<5>(offset.address(), &Hook_WorldPtToScreenPt3);
}
}