Talk:Semi or Burst fire

From Valve Developer Community
Revision as of 02:18, 1 September 2006 by DeadlyContagion (talk | contribs)

Jump to: navigation, search

Wouldn't bool be a more efficient data type here? --TomEdwards 13:51, 25 Jul 2006 (PDT)

Is this article finished? Doesn't seem like that... --dutchmega 13:57, 25 Jul 2006 (PDT)

Yeah, bool would be more efficient for semi fire only. The burst function needs the integer. Apart that, this is finished. It is not the most elegent way of doing it, but it works fine here. As I don't need to actually select the fire mode in my mod, I didn't work out that part. I just gave a hint. To make that work you would need to set up the bool m_bSemi and add that to the ItemPostFrame procedure

if ( pOwner->m_nButtons & IN_ATTACK2  )
{ if (m_bSemi){m_bSemi=false;} else {m_bSemi=true;}}

Could someone figure out how to get CHLSelectFireMachineGun working properly, with the 3-round burst switchable and whatnot? maybe as a follow-up to this article?