midnight.im
-
Автор темы
- #1
C++:
void JumpThrow(CUserCmd * cmd)
{
CBaseEntity* pLocal = (CBaseEntity*)g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer());
if (!pLocal)
return;
CBaseCombatWeapon* pWeapon = pLocal->GetWeapon();
if (!pWeapon)
return;
if (cvar::misc.jump_throw && pWeapon->IsGrenade() && !(cmd->buttons & IN_ATTACK) && !(pLocal->GetFlags() & FL_ONGROUND) && pLocal->GetVelocity().z > 265.f)
{
cmd->buttons |= IN_ATTACK;
}
}