Исходник Onetap v4 runcommand

Пользователь
Статус
Оффлайн
Регистрация
8 Янв 2020
Сообщения
187
Реакции[?]
138
Поинты[?]
20K
Onetap v4 runcommand.

Возможно вронг.

C++:
bool C_Exploits::IsTicksValid(int ticks)
{
  return g_pGlobals.CLMove.Tickcount + g_pGlobals.Server.Tickrate + m_nFutureTicks > ticks;
}

void __fastcall Hooks::RunCommand(void* ecx, void* edx, C_BasePlayer* player, CUserCmd* pCmd, IMoveHelper* move_helper)
{
  if ( !player || player != g_LocalPlayer )
  {
    oRunCommand(ecx, edx, player, pCmd, move_helper);
    return;
  }

  if ( !C_Exploits::Get().IsTicksValid(pCmd->tick_count) )
  {
    pCmd->hasbeenpredicted = true;
    return;
  }

  if ( player->IsAlive() )
  {
    if ( C_Prediction::Get().StoredCompressedTickbase[pCmd->command_number % 150] )
    {
      g_LocalPlayer->m_nTickbase() = C_Prediction::Get().StoredCompressedTickbase[pCmd->command_number % 150];
      g_GlobalVars->curtime = TICKS_TO_TIME(g_LocalPlayer->m_nTickbase());

      C_Prediction::Get().RestoreCompressedNetvars(player, pCmd->command_number, pCmd);
      oRunCommand(ecx, edx, player, pCmd, move_helper);
      C_Prediction::Get().StoreCompressedNetvars(player, pCmd->command_number);

        if ( !pCmd->hasbeenpredicted )
            C_Prediction::Get().FixViewmodel();

        C_Prediction::Get().StoredCompressedTickbase[pCmd->command_number % 150] = g_LocalPlayer->m_nTickbase();
      }
    }

   oRunCommand(ecx, edx, player, pCmd, move_helper);
}
 
Последнее редактирование:
Сверху Снизу