Talk:Semi or Burst fire

From Valve Developer Community
Revision as of 01:34, 19 November 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?

Selective fire

You can find one solution for that here: http://hl2coding.com/forums/viewtopic.php?p=6568#6568

- Pendra

TODO: Find out what it does.

I'm pretty sure that SendPropInt() registers the passed variable for networking. Anytime it is changed on the server, the new value is sent to the client(s). Its not exactly client prediction, but I suppose it can serve the same purpose. - TIDexter

Pretty sure? Is there any way that you could check the source code for its function and positively determine what it does? Considering that the one who wrote the basics for the article sounded a bit noob-ish, it might not be a mystery what it does - it was just that he didn't know or care to find out. --Andreasen 12:45, 3 Oct 2006 (PDT)