-
Автор темы
- #1
Код:
int __stdcall DrawModelExecute(void* context, void* state, ModelRenderInfo_t& info, matrix3x4_t* pCustomBoneToWorld)
{
std::string modelName = Source::m_pModelInfo->GetModelName(info.pModel);
if (Source::m_pEngine->IsInGame() && cheat::main::local && Source::m_pClientState->m_iDeltaTick != -1 && info.pModel)
{
if (modelName.find("models/player") != std::string::npos)
{
auto model_ent = Source::m_pEntList->GetClientEntity(info.entity_index);
if (model_ent == cheat::main::local && cheat::main::local->IsFakeducking())
{
const auto max_duck_height = Source::m_pGameMovement->GetPlayerViewOffset(true).z;
const auto max_stand_height = Source::m_pGameMovement->GetPlayerViewOffset(false).z;
pCustomBoneToWorld[8].SetOrigin(Vector(pCustomBoneToWorld[8].GetOrigin().x, pCustomBoneToWorld[8].GetOrigin().y, cheat::main::local->m_vecOrigin().z + math::clamp((1.0f - cheat::main::local->m_flDuckAmount()) * max_stand_height, max_duck_height, max_stand_height)));
}
}
}
видос:
Пожалуйста, авторизуйтесь для просмотра ссылки.
Credits: L3D451R7
Последнее редактирование: