Пользователь
-
Автор темы
- #1
Onetap v2 scale damage.
Возможно вронг.
Возможно вронг.
C++:
void OneTap::Features::AutoWall::ScaleDamage(C_SDK::Classes::Player::HitGroup m_iHitGroup, CCSPlayer* m_pPlayer, float* m_flCurrentDamageOverride)
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
float m_flDamage = 0.0;
switch (m_iHitGroup)
{
case HITGROUP_HEAD:
if (m_pPlayer->m_bHasHelmet())
m_flDamage = *m_flCurrentDamageOverride * 2.0;
else
m_flDamage = *m_flCurrentDamageOverride * 4.0;
break;
case HITGROUP_LEFT_ARM:
case HITGROUP_STOMACH:
case HITGROUP_LEFT_LEG:
case HITGROUP_RIGHT_ARM:
m_flDamage = *m_flCurrentDamageOverride * 1.25;
break;
case HITGROUP_RIGHT_LEG:
case HITGROUP_RIGHT_LEG | HITGROUP_CHEST:
m_flDamage = *m_flCurrentDamageOverride * 0.75;
break;
}
m_flCurrentDamageOverride = m_flDamage;
if (player->m_flArmorValue() > 0)
{
if (m_pPlayer->m_flArmorValue())
{
float m_flDefaultDamageModifier = 1.0;
float m_flArmorDamageModifier = 0.5;
float m_flArmorDamage = 0.0;
if (m_pPlayer->m_bHasArmor())
{
m_flDefaultDamageModifier = 0.33000001;
m_flArmorDamageModifier = 0.33000001;
m_flArmorDamage = m_flArmorDamage * 0.5;
}
float m_flDefaultDamage = m_flCurrentDamageOverride;
float m_flBackupDamage = m_flCurrentDamageOverride * m_flArmorDamage;
float m_flFinalDamage = m_flCurrentDamageOverride * m_flArmorDamage;
if (m_pPlayer->m_bHasArmor())
m_flFinalDamage = m_flBackupDamage * 0.85000002;
if (((m_flCurrentDamageOverride - m_flBackupDamage) * (m_flArmorDamageModifier * m_flDefaultDamageModifier)) > m_pPlayer->m_flArmorValue())
m_flFinalDamage = m_flDefaultDamage - (m_pPlayer->m_flArmorValue() / m_flDefaultDamageModifier);
m_flCurrentDamageOverride = m_flFinalDamage;
}
}
}