Don't aim if holding sapper or pda

This commit is contained in:
TotallyNotElite 2018-05-26 19:21:08 +02:00
parent 47694e3242
commit 3ab2ea1a87
4 changed files with 15 additions and 4 deletions

3
TODO
View File

@ -15,8 +15,7 @@
//------------------------------------------------------------------------------------------------------------------// //
// //
Hook + Aimbot FIX // //
// //
no aim sapper // //
// // // //
// //
Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets // //
Proper AutoHitbox, Isnt this already a thing?? // //

View File

@ -23,6 +23,7 @@ public:
bool bZoomed;
float flZoomBegin;
bool holding_sniper_rifle;
bool holding_sapper;
weaponmode weapon_mode;
bool using_action_slot_item{ false };

View File

@ -488,6 +488,10 @@ bool IsTargetStateGood(CachedEntity *entity)
}
IF_GAME(IsTF())
{
//don't aim if holding sapper
if (g_pLocalPlayer->holding_sapper)
return false;
// Wait for charge
if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle)
{
@ -585,6 +589,9 @@ bool IsTargetStateGood(CachedEntity *entity)
}
else if (entity->m_Type() == ENTITY_BUILDING)
{
//Don't aim if holding sapper
if (g_pLocalPlayer->holding_sapper)
return false;
// Enabled check
if (!(buildings_other || buildings_sentry))
return false;

View File

@ -19,13 +19,17 @@ void LocalPlayer::Update()
return;
}
holding_sniper_rifle = false;
holding_sapper = false;
wep = weapon();
if (CE_GOOD(wep))
{
weapon_mode = GetWeaponMode();
if (wep->m_iClassID() == CL_CLASS(CTFSniperRifle) ||
wep->m_iClassID() == CL_CLASS(CTFSniperRifleDecap))
holding_sniper_rifle = true;
wep->m_iClassID() == CL_CLASS(CTFSniperRifleDecap))
holding_sniper_rifle = true;
if (wep->m_iClassID() == CL_CLASS(CTFWeaponBuilder) ||
wep->m_iClassID() == CL_CLASS(CTFWeaponSapper))
holding_sapper = true;
}
team = CE_INT(entity, netvar.iTeamNum);
life_state = CE_BYTE(entity, netvar.iLifeState);