B.O.M.J
-
Автор темы
- #1
Кароче после ласт апдейта шота по пизде пошло, инпут и все остальное обновил
Код самого хука
Код самого хука
C++:
bool __fastcall C_Hooks::hkWriteUsercmdDeltaToBuffer(LPVOID pEcx, uint32_t, int32_t iSlot, bf_write* pBuffer, int32_t iFrom, int32_t iTo, bool bNewCmd)
{
if (g_ExploitSystem->GetForcedShiftAmount() < 1 || g_ExploitSystem->GetShiftMode() != MODE::SHIFT_BUFFER)
return g_Globals.m_Hooks.m_Originals.m_WriteUsercmdDeltaToBuffer(pEcx, iSlot, pBuffer, iFrom, iTo, bNewCmd);
int32_t iExtraCommands = g_ExploitSystem->GetForcedShiftAmount();
g_ExploitSystem->ResetShiftAmount();
int32_t* pNumBackupCommands = (int32_t*)((uintptr_t)(pBuffer)-0x30);
int32_t* pNumNewCommands = (int32_t*)((uintptr_t)(pBuffer)-0x2C);
int32_t iNewCommands = *pNumNewCommands;
int32_t iNextCommand = g_Globals.m_Interfaces.m_ClientState->iChokedCommands + g_Globals.m_Interfaces.m_ClientState->nLastOutgoingCommand + 1;
*pNumBackupCommands = 0;
for (iTo = iNextCommand - iNewCommands + 1; iTo <= iNextCommand; iTo++)
{
if (!g_Globals.m_Hooks.m_Originals.m_WriteUsercmdDeltaToBuffer(pEcx, iSlot, pBuffer, iFrom, iTo, true))
return false;
iFrom = iTo;
}
*pNumNewCommands = iNewCommands + iExtraCommands;
C_UserCmd* pCmd = g_Globals.m_Interfaces.m_Input->GetUserCmd(iSlot, iFrom);
if (!pCmd)
return true;
C_UserCmd ToCmd = *pCmd;
C_UserCmd FromCmd = *pCmd;
ToCmd.m_nCommand++;
ToCmd.m_nTickCount += 200;
for (int32_t i = iNewCommands; i <= iNewCommands + iExtraCommands; i++)
{
WriteUsercmd(pBuffer, &ToCmd, &FromCmd);
ToCmd.m_nTickCount--;
ToCmd.m_nCommand--;
FromCmd.m_nTickCount = ToCmd.m_nTickCount + 1;
FromCmd.m_nCommand = ToCmd.m_nCommand + 1;
}
return true;
}
Последнее редактирование: