Welcome, Guest.

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

Online KittoniuM

  • Administrator
  • Level 8 - Tru Packet
  • *
  • Posts: 1119
    • View Profile
  • Canada
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 Members


  • Youtube Youtube
  • Facebook Facebook
  • Twitter Twitter
  • Steam Steam

  • Powered by SMF | SMF © 2018, Simple Machines

    2018 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.