-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
void _fastcall hooks :: do_extra_bone_processing (void * ecx, void * edx, CStudioHdr * hdr, Vector * pos, Quaternion * q, const matrix3x4_t & matrix, byte * boneComputed, CIKContext * context)
{
/ * if (g_pLocalPlayer && ecx == g_pLocalPlayer)
return; * /
auto player = reinterpret_cast <C_CSPlayer *> (ecx);
auto backup_animstate = player-> get_anim_state ();
if (player-> get_effects () & EF_NOINTERP)
return
const auto animstate = player-> get_anim_state ();
if (! animstate || animstate-> pBaseEntity)
return orig_do_extra_bone_processing (ecx, hdr, pos, q, matrix, boneComputed, context);
const auto on_ground = animstate-> m_bOnGround;
player-> get_effects () & EF_NOINTERP;
{
// animstate-> m_bOnGround = false;
const auto backup_tickcount = * reinterpret_cast <int32_t *> (animstate + 8);
* reinterpret_cast <int32_t *> (animstate + 8) = 0;
player-> get_anim_state () = 0;
player-> get_anim_state () -> m_flGoalFeetYaw = 0.f;
orig_do_extra_bone_processing (ecx, hdr, pos, q, matrix, boneComputed, context);
* reinterpret_cast <int32_t *> (animstate + 8) = backup_tickcount;
}
player-> get_anim_state () -> m_flFeetCycle + = g_pGlobals-> frametime;
player-> get_anim_state () = backup_animstate;
// animstate-> m_bOnGround = on_ground;
} [/ CODE]