Welcome, Guest.

Author Topic: [ Reversing ] Finding Weapon Spread in Source Engine Games  (Read 1161 times)

Offline KittoniuM

  • Administrator
  • *
  • Posts: 1269
    • View Profile
Finding Weapon Spread in Source Engine Games
« on: February 09, 2019, 12:18:57 AM »
Code: [Select]
info.m_flDistance = MAX_TRACE_LENGTH;
info.m_iAmmoType = m_iPrimaryAmmoType;
info.m_iTracerFreq = 2;

#if !defined( CLIENT_DLL )
// Fire the bullets
info.m_vecSpread = pPlayer->GetAttackSpread( this );
#else
//!!!HACKHACK - what does the client want this function for?
info.m_vecSpread = GetActiveWeapon()->GetBulletSpread();
#endif // CLIENT_DLL

pPlayer->FireBullets( info );

if (!m_iClip1 && pPlayer->GetAmmoCount(m_iPrimaryAmmoType) <= 0)
{
// HEV suit - indicate out of ammo condition
pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);
}

//Add our view kick in
AddViewKick();
}

Search for "!HEV_AMO0" and use psuedocode to help you find the abvoe offset
« Last Edit: February 28, 2019, 09:19:05 PM by KittoniuM »



Total Registered Members:





2017-2023 BigPackets. All rights reserved. All other trademarks, logos and copyrights are the property of their respective owners. This site is not associated with any company in any way.