diff --git a/NEPS/Config.cpp b/NEPS/Config.cpp index 09d1b677..66a1ef87 100644 --- a/NEPS/Config.cpp +++ b/NEPS/Config.cpp @@ -663,8 +663,9 @@ static void from_json(const json &j, Config::Misc &m) read(j, "Fix movement", m.fixMovement); read(j, "Fix animations", m.fixAnimation); read(j, "Disable model occlusion", m.disableModelOcclusion); - read(j, "Unlock invertory", m.unlockInvertory); + read(j, "Disable interpolation", m.disableInterp); read(j, "Resolver", m.desyncResolver); + read(j, "Unlock invertory", m.unlockInvertory); read(j, "Disable HUD blur", m.disablePanoramablur); read(j, "Prepare revolver", m.prepareRevolver); read(j, "Purchase list", m.purchaseList); @@ -1121,8 +1122,9 @@ static void to_json(json &j, const Config::Misc &o) WRITE("Fix movement", fixMovement); WRITE("Fix animations", fixAnimation); WRITE("Disable model occlusion", disableModelOcclusion); - WRITE("Unlock invertory", unlockInvertory); + WRITE("Disable interpolation", disableInterp); WRITE("Resolver", desyncResolver); + WRITE("Unlock invertory", unlockInvertory); WRITE("Disable HUD blur", disablePanoramablur); WRITE("Prepare revolver", prepareRevolver); WRITE("Quick healthshot key", quickHealthshotKey); diff --git a/NEPS/Config.h b/NEPS/Config.h index d361bbb6..bed70758 100644 --- a/NEPS/Config.h +++ b/NEPS/Config.h @@ -369,8 +369,9 @@ class Config bool fixMovement = true; bool fixAnimation = true; bool disableModelOcclusion = true; - bool unlockInvertory = false; + bool disableInterp = false; bool desyncResolver; + bool unlockInvertory = false; bool disablePanoramablur = false; struct PreserveKillfeed { diff --git a/NEPS/GUI.cpp b/NEPS/GUI.cpp index fcb6a62c..d2434f76 100644 --- a/NEPS/GUI.cpp +++ b/NEPS/GUI.cpp @@ -2212,6 +2212,7 @@ void GUI::renderMiscWindow(bool contentOnly) noexcept ImGui::Checkbox("Fix movement", &config->misc.fixMovement); ImGui::Checkbox("Sync client animations", &config->misc.fixAnimation); ImGui::Checkbox("Disable model occlusion", &config->misc.disableModelOcclusion); + ImGui::Checkbox("Disable interpolation", &config->misc.disableInterp); ImGui::Checkbox("Desync resolver", &config->misc.desyncResolver); ImGui::NextColumn(); diff --git a/NEPS/Hacks/Misc.cpp b/NEPS/Hacks/Misc.cpp index 541937a2..1383da44 100644 --- a/NEPS/Hacks/Misc.cpp +++ b/NEPS/Hacks/Misc.cpp @@ -976,25 +976,31 @@ void Misc::antiAfkKick(UserCmd *cmd) noexcept cmd->buttons |= 1 << 26; } -void Misc::fixAnimationLOD(FrameStage stage) noexcept +void Misc::tweakNonLocalPlayerAnim(FrameStage stage) noexcept { - if (config->misc.fixAnimationLOD && stage == FrameStage::RENDER_START) + if (stage == FrameStage::RENDER_START) { if (!localPlayer) return; + if (!config->misc.fixAnimationLOD && !config->misc.disableInterp) + return; + for (int i = 1; i <= interfaces->engine->getMaxClients(); i++) { Entity *entity = interfaces->entityList->getEntity(i); if (!entity || entity == localPlayer.get() || entity->isDormant() || !entity->isAlive()) continue; - *reinterpret_cast(entity + 0xA28) = 0; - *reinterpret_cast(entity + 0xA30) = memory->globalVars->framecount; + if (config->misc.fixAnimationLOD) + { + *reinterpret_cast(entity + 0xA28) = 0; + *reinterpret_cast(entity + 0xA30) = memory->globalVars->framecount; + } - //if (auto varMap = entity->getVarMap()) - // for (int j = 0; j < varMap->entries.size; j++) - // varMap->entries[j].needsToInterpolate = 0; + if (auto varMap = entity->getVarMap(); varMap && config->misc.disableInterp) + for (int j = 0; j < varMap->entries.size; j++) + varMap->entries[j].needsToInterpolate = 0; } } } diff --git a/NEPS/Hacks/Misc.h b/NEPS/Hacks/Misc.h index 45024863..13ee47be 100644 --- a/NEPS/Hacks/Misc.h +++ b/NEPS/Hacks/Misc.h @@ -31,7 +31,7 @@ namespace Misc void killMessage(GameEvent &event) noexcept; void fixMovement(UserCmd *cmd, float yaw) noexcept; void antiAfkKick(UserCmd *cmd) noexcept; - void fixAnimationLOD(FrameStage stage) noexcept; + void tweakNonLocalPlayerAnim(FrameStage stage) noexcept; void autoPistol(UserCmd *cmd) noexcept; void autoReload(UserCmd *cmd) noexcept; void revealRanks(UserCmd *cmd) noexcept; diff --git a/NEPS/Hooks.cpp b/NEPS/Hooks.cpp index 02b0e55d..e453c7cc 100644 --- a/NEPS/Hooks.cpp +++ b/NEPS/Hooks.cpp @@ -355,7 +355,7 @@ static void __stdcall frameStageNotify(FrameStage stage) noexcept Visuals::playerModel(stage); Visuals::disablePostProcessing(stage); Visuals::removeVisualRecoil(stage); - Misc::fixAnimationLOD(stage); + Misc::tweakNonLocalPlayerAnim(stage); Backtrack::update(stage); SkinChanger::run(stage); }