Merge pull request #126 from julianacat/master
Added a couple of nice changes
This commit is contained in:
commit
c4ee67d0d8
@ -382,6 +382,7 @@ static const std::string list_tf2 = R"(
|
||||
"esp_class"
|
||||
"esp_name"
|
||||
"esp_distance"
|
||||
"esp_ubercharge"
|
||||
"esp_box"
|
||||
"esp_box_text_position"
|
||||
"esp_box_nodraw"
|
||||
|
@ -697,7 +697,7 @@ int BestHitbox(CachedEntity* target) {
|
||||
PROF_SECTION(CM_aimbot_besthitbox);
|
||||
|
||||
int preferred, ci, flags, bdmg;
|
||||
float cdmg;
|
||||
float cdmg, bodmg;
|
||||
bool ground;
|
||||
preferred = hitbox;
|
||||
switch ((int)hitbox_mode) {
|
||||
@ -728,27 +728,27 @@ int BestHitbox(CachedEntity* target) {
|
||||
}
|
||||
if (g_pLocalPlayer->holding_sniper_rifle) {
|
||||
cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage);
|
||||
bdmg = 50;
|
||||
bodmg = 50;
|
||||
//Darwins damage correction
|
||||
if (target->m_iMaxHealth == 150 && target->m_iClassID == tf_sniper) {
|
||||
bdmg = (bdmg / 1.15) - 1;
|
||||
cdmg = (cdmg / 1.15) - 1;
|
||||
bodmg = (bodmg * .85) - 1;
|
||||
cdmg = (cdmg * .85) - 1;
|
||||
}
|
||||
//Vaccinator damage correction
|
||||
if (HasCondition<TFCond_UberBulletResist>(target)) {
|
||||
bdmg = (bdmg / 1.75) - 1;
|
||||
cdmg = (cdmg / 1.75) - 1;
|
||||
bodmg = (bodmg * .25) - 1;
|
||||
cdmg = (cdmg * .25) - 1;
|
||||
} else if (HasCondition<TFCond_SmallBulletResist>(target)) {
|
||||
bdmg = (bdmg / 1.1) - 1;
|
||||
cdmg = (cdmg / 1.1) - 1;
|
||||
bodmg = (bodmg * .90) - 1;
|
||||
cdmg = (cdmg * .90) - 1;
|
||||
}
|
||||
//Invis damage correction
|
||||
if (IsPlayerInvisible(target)) {
|
||||
bdmg = (bdmg / 1.20) - 1;
|
||||
cdmg = (cdmg / 1.20) - 1;
|
||||
bodmg = (bodmg * .80) - 1;
|
||||
cdmg = (cdmg * .80) - 1;
|
||||
}
|
||||
//If can headshot and if bodyshot kill from charge damage, or if crit boosted and they have 150 health, or if player isnt zoomed, or if the enemy has less than 40, due to darwins, and only if they have less than 150 health will it try to bodyshot
|
||||
if (CanHeadshot() && (cdmg >= target->m_iHealth || IsPlayerCritBoosted(g_pLocalPlayer->entity) || !g_pLocalPlayer->bZoomed || target->m_iHealth <= bdmg) && target->m_iHealth <= 150) {
|
||||
if (CanHeadshot() && (cdmg >= target->m_iHealth || IsPlayerCritBoosted(g_pLocalPlayer->entity) || !g_pLocalPlayer->bZoomed || target->m_iHealth <= bodmg) && target->m_iHealth <= 150) {
|
||||
preferred = ClosestHitbox(target);
|
||||
headonly = false;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ CatVar show_distance(CV_SWITCH, "esp_distance", "1", "Distance ESP", "Show dista
|
||||
CatVar show_name(CV_SWITCH, "esp_name", "1", "Name ESP", "Show name");
|
||||
CatVar show_class(CV_SWITCH, "esp_class", "1", "Class ESP", "Show class");
|
||||
CatVar show_conditions(CV_SWITCH, "esp_conds", "1", "Conditions ESP", "Show conditions");
|
||||
CatVar show_ubercharge(CV_SWITCH, "esp_ubercharge", "1", "Ubercharge ESP", "Show ubercharge percentage while players medigun is out");
|
||||
CatVar vischeck(CV_SWITCH, "esp_vischeck", "1", "VisCheck", "ESP visibility check - makes enemy info behind walls darker, disable this if you get FPS drops");
|
||||
CatVar legit(CV_SWITCH, "esp_legit", "0", "Legit Mode", "Don't show invisible enemies");
|
||||
CatVar show_health(CV_SWITCH, "esp_health_num", "1", "Health numbers", "Show health in numbers");
|
||||
@ -309,7 +310,7 @@ void _FASTCALL DrawBox(CachedEntity* ent, int clr, float widthFactor, float addH
|
||||
|
||||
void _FASTCALL ProcessEntity(CachedEntity* ent) {
|
||||
const model_t* model;
|
||||
int string_count_backup, level, pclass;
|
||||
int string_count_backup, level, pclass, *weapon_list, handle, eid;
|
||||
bool shown;
|
||||
player_info_s info;
|
||||
powerup_type power;
|
||||
@ -465,6 +466,24 @@ void _FASTCALL ProcessEntity(CachedEntity* ent) {
|
||||
AddEntityString(ent, format(ent->m_iHealth, '/', ent->m_iMaxHealth, " HP"), colors::Health(ent->m_iHealth, ent->m_iMaxHealth));
|
||||
}
|
||||
IF_GAME (IsTF()) {
|
||||
if (show_ubercharge) {
|
||||
if (CE_INT(ent, netvar.iClass) == tf_medic) {
|
||||
weapon_list = (int*)((unsigned)(RAW_ENT(ent)) + netvar.hMyWeapons);
|
||||
for (int i = 0; weapon_list[i]; i++) {
|
||||
handle = weapon_list[i];
|
||||
eid = handle & 0xFFF;
|
||||
if (eid >= 32 && eid <= HIGHEST_ENTITY) {
|
||||
weapon = ENTITY(eid);
|
||||
if (!CE_BAD(weapon) && weapon->m_iClassID == CL_CLASS(CWeaponMedigun) && weapon) {
|
||||
if (CE_INT(weapon, netvar.iItemDefinitionIndex) != 998) {
|
||||
AddEntityString(ent, format(floor( CE_FLOAT(weapon, netvar.m_flChargeLevel) * 100 ), '%', " Uber"), colors::Health(( CE_FLOAT(weapon, netvar.m_flChargeLevel) * 100 ), 100));
|
||||
} else AddEntityString(ent, format(floor( CE_FLOAT(weapon, netvar.m_flChargeLevel) * 100 ), '%', " Uber | Charges: ", floor( CE_FLOAT(weapon, netvar.m_flChargeLevel) / 0.25f )), colors::Health(( CE_FLOAT(weapon, netvar.m_flChargeLevel) * 100 ), 100));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (show_conditions) {
|
||||
if (IsPlayerInvisible(ent)) {
|
||||
AddEntityString(ent, "INVISIBLE");
|
||||
|
@ -44,7 +44,7 @@ void InstantZoom() {
|
||||
//Setup
|
||||
instant_rezoom_timer_active = true;
|
||||
instant_rezoom_timer_step = 0;
|
||||
instant_rezoom_tick = 15;
|
||||
instant_rezoom_tick = 12;
|
||||
} else if (instant_rezoom_tick > 0 && instant_rezoom_timer_step == 0){
|
||||
instant_rezoom_tick--;
|
||||
} else if (instant_rezoom_timer_step == 0) {
|
||||
|
Reference in New Issue
Block a user