分享個 CSO反視覺抖動
我記得這個功能以前有人開源過 鼠標地址+xx 寫0 需要開個線程循環寫 非常浪費CPU資源目前可以用以下這幾種方法實現
第壹種 HOOK V_CalcRefdef
對pparams->punchangle 清零操作 我目前就是用的這種方法
if (g_Vars.AibBot.Enable && g_Vars.AibBot.AntiJitter )
{
VectorClear(pparams->punchangle);
}
第二種 對寫0地址Nop
bool g_AntiJitterError = false;
void AntiJitter()
{
static bool InitData = false;
static DWORD dwAddres, dwAddres2;
static char* Buff = { nullptr,nullptr,nullptr,nullptr };
static bool IsOK = false;
if (!InitData)
{
InitData = true;
if (AntiHookGetScanCode((char*)("f3 0f 11 05 ?? ?? ?? ?? F3 0F 10 8F 78 01 00 00"), dwAddres, (HMODULE)Engine::g_Offset.GetHwBase()))
{
DWORD dwOldProtect;
VirtualProtect((void*)dwAddres, 1024, PAGE_EXECUTE_READWRITE, &dwOldProtect);
}
else
{
LPSTR Msg = UnicodeToUTF8(L"AntiJitter Error1!");
g_Util.GameCsoMsg(Msg);
g_AntiJitterError = true;
return;
}
if (AntiHookGetScanCode((char*)("F3 0F 10 81 A0 00 00 00 F3 0F 11 05"), dwAddres2, (HMODULE)Engine::g_Offset.GetHwBase()))
{
DWORD dwOldProtect;
VirtualProtect((void*)dwAddres2, 1024, PAGE_EXECUTE_READWRITE, &dwOldProtect);
}
else
{
LPSTR Msg = UnicodeToUTF8(L"AntiJitter Error2!");
g_Util.GameCsoMsg(Msg);
g_AntiJitterError = true;
return;
}
}
else
{
if (g_Vars.AibBot.AntiJitter)
{
if (Buff == nullptr)
{
Buff = new char;
for (int i = 0; i < 8; i++)
{
Buff = *(byte*)(dwAddres + i);
}
Buff = new char;
for (int i = 0; i < 8; i++)
{
Buff = *(byte*)((dwAddres+0x24) + i);
}
Buff = new char;
for (int i = 0; i < 0x18; i++)
{
Buff = *(byte*)((dwAddres2) + i);
}
}
if (!IsOK)
{
IsOK = true;
for (int i = 0; i < 8; i++)
{
*(byte*)(dwAddres + i) = 0x90;
}
for (int i = 0; i < 8; i++)
{
*(byte*)((dwAddres + 0x24) + i) = 0x90;
}
for (int i = 0; i < 0x18; i++)
{
*(byte*)((dwAddres2)+i) = 0x90;
}
LPSTR Msg = UnicodeToUTF8(L"AntiJitter OK!");
g_Util.GameCsoMsg(Msg);
}
}
else
{
//恢复
if (IsOK && Buff != nullptr)
{
IsOK = false;
for (int i = 0; i < 8; i++)
{
*(byte*)(dwAddres + i) = Buff;
}
for (int i = 0; i < 8; i++)
{
*(byte*)((dwAddres + 0x24) + i) = Buff;
}
for (int i = 0; i < 0x18; i++)
{
*(byte*)((dwAddres2)+i) = Buff;
}
LPSTR Msg = UnicodeToUTF8(L"AntiJitter off!");
g_Util.GameCsoMsg(Msg);
}
}
}
/*374308E0 - F3 0F11 05 A0757E39 - movss ,xmm0
374308E8 - F3 0F10 8F 78010000 - movss xmm1,
f3 0f 11 05 ?? ?? ?? ?? F3 0F 10 8F 78 01 00 00
F3 0F 10 45 CC F3 0F 11 05 ?? ?? ?? ??
37517736 - F3 0F10 81 A0000000 - movss xmm0,
3751773E - F3 0F11 05 A0757E39 - movss ,xmm0
37517746 - F3 0F10 81 A4000000 - movss xmm0,
3751774E - F3 0F11 05 A4757E39 - movss ,xmm0
F3 0F 10 81 A0 00 00 00 F3 0F 11 05*/
}
第三種就是循環寫0啦 就不多說了
反正各有優缺點 這個功能只是視覺上沒有後坐力
开源过这功能的是jses40813
不过鼠标+xx 的三个基址有两个已经没有作用
頁:
[1]