diff --git a/source-code/source/plugins/TLAC/Components/Pause.cpp b/source-code/source/plugins/TLAC/Components/Pause.cpp index 4563e07a..c6952da6 100644 --- a/source-code/source/plugins/TLAC/Components/Pause.cpp +++ b/source-code/source/plugins/TLAC/Components/Pause.cpp @@ -32,9 +32,13 @@ namespace TLAC::Components Pause::menusets Pause::curMenuSet = MENUSET_MAIN; std::chrono::time_point Pause::menuItemMoveTime; std::vector Pause::origAetMovOp; + float_t Pause::origDeltaFrameHistory = 0.0f; + int32_t Pause::origDeltaFrameHistoryInt = 0; uint8_t* Pause::aetMovPatchAddress = (uint8_t*)0x1401703b3; std::vector Pause::origFramespeedOp; uint8_t* Pause::framespeedPatchAddress = (uint8_t*)0x140192D50; + float_t* Pause::deltaFrameHistoryAddress = (float_t*)0x140EDA6C0; + int32_t* Pause::deltaFrameHistoryIntAddress = (int32_t*)0x140EDA6C4; std::vector Pause::origAgeageHairOp; uint8_t* Pause::ageageHairPatchAddress = (uint8_t*)0x14054352c; std::vector Pause::streamPlayStates; @@ -136,6 +140,12 @@ namespace TLAC::Components InjectCode(framespeedPatchAddress, { 0x0f, 0x57, 0xc0, 0xc3 }); // XORPS XMM0,XMM0; RET InjectCode(ageageHairPatchAddress, { 0x0f, 0x57, 0xdb }); // XORPS XMM3,XMM3 + origDeltaFrameHistory = *deltaFrameHistoryAddress; + origDeltaFrameHistoryInt = *deltaFrameHistoryIntAddress; + + *deltaFrameHistoryAddress = 0.0f; + *deltaFrameHistoryIntAddress = 0; + uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70); uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18); int nAudioStreams = *(uint64_t*)(audioMixerAddr + 0x20); @@ -279,6 +289,9 @@ namespace TLAC::Components InjectCode(framespeedPatchAddress, origFramespeedOp); InjectCode(ageageHairPatchAddress, origAgeageHairOp); + *deltaFrameHistoryAddress = origDeltaFrameHistory; + *deltaFrameHistoryIntAddress = origDeltaFrameHistoryInt; + uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70); uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18); int nAudioStreams = *(uint64_t*)(audioMixerAddr + 0x20); diff --git a/source-code/source/plugins/TLAC/Components/Pause.h b/source-code/source/plugins/TLAC/Components/Pause.h index 429c2338..1162ec62 100644 --- a/source-code/source/plugins/TLAC/Components/Pause.h +++ b/source-code/source/plugins/TLAC/Components/Pause.h @@ -47,6 +47,10 @@ namespace TLAC::Components static std::vector origFramespeedOp; static uint8_t* framespeedPatchAddress; + static float_t origDeltaFrameHistory; + static int32_t origDeltaFrameHistoryInt; + static float_t* deltaFrameHistoryAddress; + static int32_t* deltaFrameHistoryIntAddress; static std::vector origAgeageHairOp; static uint8_t* ageageHairPatchAddress;