The prediciton code will call it every frame. Thats why your PrimaryAttack function kerps getting called. You should check if runfuncs is true wich gets set only for one frame when the update comes. That way you can be sure that it will only be done once.
Thats why events only get fired once, so even tho your PrimaryAttack function keeps getting called over and over again you only see your event fired one time. -----Original Message----- From: Commando To: [EMAIL PROTECTED] Sent: 5/3/2002 2:12 AM Subject: Re: [hlcoders] 3 round burst bug We saw something similar with Tour of Duty when we added recoil to our weapons in the PrimaryAttack. When playing locally or a lan game, everything worked fine, but when playing on the network, I found that the PrimaryAttack got called three times for every shot on client side. It was as if the m_flNextPrimaryAttack was not being used on the client in network games. The weird thing was that m_iClip had the same value each of the three times, even though we decremented it each time. We never noticed this before we put in the recoil because it happened so quickly, it looked like one shot. Once we put the recoil in, it got applied three times client side. I just figured that I had broken something when I ported from 2.0 to 2.2, but maybe it is a bug in client side prediction. I was never able to track it down because debugging a network game is no fun. I just fixed it by not applying recoil client side ;) A hack, but it works. I would be interested to know if anyone else experiences this and it is a bug in the SDK. It is simple to check, just put a breakpoint in your primary attack and connect to a net server (not lan) and give it a try. Maybe you are experiencing the same thing, but it is manifesting a different way. Rob Prouse http://www.tourofdutymod.com At 06:12 PM 03/05/2002 +1000, you wrote: >Firearms suffers from the same bug :( >We have yet to track it down, but it will be related to how the client >predicts the operation of weapons code. I suspect something is getting reset >when it shouldn't be and allowing more bullets to fire. > >A quick fix can be to have a special 3 round bust mode (and anim), but this >isn't ideal. > >----- Original Message ----- >From: "Josh Coyne" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Friday, May 03, 2002 2:32 PM >Subject: [hlcoders] 3 round burst bug > > > > This is a multi-part message in MIME format. > > -- > > [ Picked text/plain from multipart/alternative ] > > Hey guys, one our weapons, the SMG9, has a 3 round burst toggle mode; > > > > for the most part it works perfectly in no lag and even 'low' lag >situations, up to about 200ms or so. > > > > but once you go past 200ms, the gun starts shooting extra bullets. its >kind of weird; and im pretty much clueless on how to stop it. > > > > Now i made some support functions a while ago (PackWeapon and >UnpackWeapon) to transfer data from the server to the client for prediction, >and i properly send the m_iAllowFire, and m_iBulletCount variables for the >prediciton, and it works lovely. > > > > Can anyone offer hints on making sure the client will only fire 3 times ? _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders