Have you guys seen kodu? lol ur debuggin the gun code....i think you're doing it wrong, what are you making? You're never going to finish that way.....there's a better way to design thru it, but why are peo0ple building with this tool? that bein said lets make minecraft in source sdk with guns ! ;p or somethin fun and higher level than makin the netcode not be buggy they arleady diud that in source right? moreso than we're goin to, not gettin paid for this are you?
On Tue, Jul 12, 2011 at 12:00 PM, <hlcoders-requ...@list.valvesoftware.com> wrote: > Send hlcoders mailing list submissions to > hlcoders@list.valvesoftware.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://list.valvesoftware.com/mailman/listinfo/hlcoders > or, via email, send a message with subject or body 'help' to > hlcoders-requ...@list.valvesoftware.com > > You can reach the person managing the list at > hlcoders-ow...@list.valvesoftware.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of hlcoders digest..." > > > Today's Topics: > > 1. weapon prediction issue (Priyadarshi Sharma) > 2. Re: weapon prediction issue (Tom Edwards) > 3. Re: weapon prediction issue (Will @ Laby) > 4. Re: weapon prediction issue (Priyadarshi Sharma) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 12 Jul 2011 13:35:39 +0530 > From: Priyadarshi Sharma <priyadarshi...@gmail.com> > To: hlcoders@list.valvesoftware.com > Subject: [hlcoders] weapon prediction issue > Message-ID: > <CAMDStNkWyB8fD=9CdcsNwJYGpawSURaaZ2hJnjBGKajR=-4...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hello, > > I am having the issue of a weapon being fired multiple times on client > side when there is a lag between client and server (net_fakelag 100). > This is similar to the issue mentioned here : > http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19271.html > > I've tried the suggested fix but it doesn't seem to help in my case. > It only happens in the burst fire mode though, not otherwise. > > Below are the relevant functions. As you can see, even checking for > IsFirstTimePredicted() doesn't solve the issue and the function is > still called multiple times on client side as evident from the > DevMsg() below. How do I go on about solving this issue? > > PS - I've also tried the fix mentioned here - > http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19344.html, > which indicates a bug with the SDK itself, but no help here too. > > Code : > > void MyWeapon::ItemPostFrame() > { > > // Burstfire continues for 3 shots after we press fire > if(cBurstShots) > BurstFire(); > else > BaseClass::ItemPostFrame(); > } > > void MyWeapon::BurstFire() > { > if (!m_iClip1) > { > cBurstShots = 0; > return; > } > > if (tNextBurst > gpGlobals->curtime) > return; > > #ifdef CLIENT_DLL > if ( prediction->InPrediction() && !prediction->IsFirstTimePredicted() > ) > return; > #endif > > #ifdef CLIENT_DLL > DevMsg("Time : %f cBurstShots : %d tNextBurst : %f\n", > gpGlobals->curtime, cBurstShots, tNextBurst); > #endif > > // making this NOT relative to curtime means it won't be totally > cpu/tickrate dependent > tNextBurst += info.m_tReloadChamber; > > --cBurstShots; > > Fire(); > > m_flNextPrimaryAttack = m_flNextSecondaryAttack = gpGlobals->curtime + > 0.1; > > WeaponSound( SINGLE ); > DoMuzzleFlash(); > } > > > void MyWeapon::PrimaryAttack() > { > if (!fBurstMode) > { > Fire(); > return; > } > > cBurstShots = 3; > tNextBurst = gpGlobals->curtime; > SendWeaponAnim( ACT_VM_PRIMARYATTACK ); > } > > > > ------------------------------ > > Message: 2 > Date: Tue, 12 Jul 2011 11:54:22 +0100 > From: Tom Edwards <t_edwa...@btinternet.com> > To: Discussion of Half-Life Programming > <hlcoders@list.valvesoftware.com> > Subject: Re: [hlcoders] weapon prediction issue > Message-ID: <4e1c27de.9060...@btinternet.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > The function being called multiple times is normal, that's how > prediction testing works. Does the weapon actually end up in an > incorrect state after firing multiple times? If not, this is likely to > be a problem with the viewmodel entity rather than the weapon. Are you > using predicted_viewmodel? > > On 12/07/2011 9:05, Priyadarshi Sharma wrote: >> Hello, >> >> I am having the issue of a weapon being fired multiple times on client >> side when there is a lag between client and server (net_fakelag 100). >> This is similar to the issue mentioned here : >> http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19271.html >> >> I've tried the suggested fix but it doesn't seem to help in my case. >> It only happens in the burst fire mode though, not otherwise. >> >> Below are the relevant functions. As you can see, even checking for >> IsFirstTimePredicted() doesn't solve the issue and the function is >> still called multiple times on client side as evident from the >> DevMsg() below. How do I go on about solving this issue? >> >> PS - I've also tried the fix mentioned here - >> http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19344.html, >> which indicates a bug with the SDK itself, but no help here too. >> >> Code : >> >> void MyWeapon::ItemPostFrame() >> { >> >> // Burstfire continues for 3 shots after we press fire >> if(cBurstShots) >> BurstFire(); >> else >> BaseClass::ItemPostFrame(); >> } >> >> void MyWeapon::BurstFire() >> { >> if (!m_iClip1) >> { >> cBurstShots = 0; >> return; >> } >> >> if (tNextBurst> gpGlobals->curtime) >> return; >> >> #ifdef CLIENT_DLL >> if ( prediction->InPrediction()&& >> !prediction->IsFirstTimePredicted() ) >> return; >> #endif >> >> #ifdef CLIENT_DLL >> DevMsg("Time : %f cBurstShots : %d tNextBurst : %f\n", >> gpGlobals->curtime, cBurstShots, tNextBurst); >> #endif >> >> // making this NOT relative to curtime means it won't be totally >> cpu/tickrate dependent >> tNextBurst += info.m_tReloadChamber; >> >> --cBurstShots; >> >> Fire(); >> >> m_flNextPrimaryAttack = m_flNextSecondaryAttack = gpGlobals->curtime + >> 0.1; >> >> WeaponSound( SINGLE ); >> DoMuzzleFlash(); >> } >> >> >> void MyWeapon::PrimaryAttack() >> { >> if (!fBurstMode) >> { >> Fire(); >> return; >> } >> >> cBurstShots = 3; >> tNextBurst = gpGlobals->curtime; >> SendWeaponAnim( ACT_VM_PRIMARYATTACK ); >> } >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> > > > > ------------------------------ > > Message: 3 > Date: Tue, 12 Jul 2011 21:35:30 +1000 > From: "Will @ Laby" <wbeat...@labyrinth.net.au> > To: "'Discussion of Half-Life Programming'" > <hlcoders@list.valvesoftware.com> > Subject: Re: [hlcoders] weapon prediction issue > Message-ID: <6984484A8F7E4528962D98EAE78A793D@vnetcafe.local> > Content-Type: text/plain; charset="us-ascii" > > Thanks for the input we'll look into it > cheers > > -----Original Message----- > From: hlcoders-boun...@list.valvesoftware.com > [mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Priyadarshi > Sharma > Sent: Tuesday, 12 July 2011 6:06 PM > To: hlcoders@list.valvesoftware.com > Subject: [hlcoders] weapon prediction issue > > Hello, > > I am having the issue of a weapon being fired multiple times on client > side when there is a lag between client and server (net_fakelag 100). > This is similar to the issue mentioned here : > http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19271.html > > I've tried the suggested fix but it doesn't seem to help in my case. > It only happens in the burst fire mode though, not otherwise. > > Below are the relevant functions. As you can see, even checking for > IsFirstTimePredicted() doesn't solve the issue and the function is > still called multiple times on client side as evident from the > DevMsg() below. How do I go on about solving this issue? > > PS - I've also tried the fix mentioned here - > http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19344.html, > which indicates a bug with the SDK itself, but no help here too. > > Code : > > void MyWeapon::ItemPostFrame() > { > > // Burstfire continues for 3 shots after we press fire > if(cBurstShots) > BurstFire(); > else > BaseClass::ItemPostFrame(); > } > > void MyWeapon::BurstFire() > { > if (!m_iClip1) > { > cBurstShots = 0; > return; > } > > if (tNextBurst > gpGlobals->curtime) > return; > > #ifdef CLIENT_DLL > if ( prediction->InPrediction() && > !prediction->IsFirstTimePredicted() ) > return; > #endif > > #ifdef CLIENT_DLL > DevMsg("Time : %f cBurstShots : %d tNextBurst : %f\n", > gpGlobals->curtime, cBurstShots, tNextBurst); > #endif > > // making this NOT relative to curtime means it won't be totally > cpu/tickrate dependent > tNextBurst += info.m_tReloadChamber; > > --cBurstShots; > > Fire(); > > m_flNextPrimaryAttack = m_flNextSecondaryAttack = gpGlobals->curtime > + 0.1; > > WeaponSound( SINGLE ); > DoMuzzleFlash(); > } > > > void MyWeapon::PrimaryAttack() > { > if (!fBurstMode) > { > Fire(); > return; > } > > cBurstShots = 3; > tNextBurst = gpGlobals->curtime; > SendWeaponAnim( ACT_VM_PRIMARYATTACK ); > } > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > > > > ------------------------------ > > Message: 4 > Date: Tue, 12 Jul 2011 17:12:36 +0530 > From: Priyadarshi Sharma <priyadarshi...@gmail.com> > To: Discussion of Half-Life Programming > <hlcoders@list.valvesoftware.com> > Subject: Re: [hlcoders] weapon prediction issue > Message-ID: > <CAMDStN=8nne10-y8mihzloeria-p0axegfezoxspe7up0sa...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > The weapon doesn't end up in an incorrect state and it is using > predicted_viewmodel. But I also see the wall decals corresponding to > the number of times the function was called, so that shouldn't relate > to a viewmodel problem. > > On Tue, Jul 12, 2011 at 4:24 PM, Tom Edwards <t_edwa...@btinternet.com> wrote: >> The function being called multiple times is normal, that's how prediction >> testing works. Does the weapon actually end up in an incorrect state after >> firing multiple times? If not, this is likely to be a problem with the >> viewmodel entity rather than the weapon. Are you using predicted_viewmodel? >> >> On 12/07/2011 9:05, Priyadarshi Sharma wrote: >>> >>> Hello, >>> >>> I am having the issue of a weapon being fired multiple times on client >>> side when there is a lag between client and server (net_fakelag 100). >>> This is similar to the issue mentioned here : >>> http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19271.html >>> >>> I've tried the suggested fix but it doesn't seem to help in my case. >>> It only happens in the burst fire mode though, not otherwise. >>> >>> Below are the relevant functions. As you can see, even checking for >>> IsFirstTimePredicted() doesn't solve the issue and the function is >>> still called multiple times on client side as evident from the >>> DevMsg() below. How do I go on about solving this issue? >>> >>> PS - I've also tried the fix mentioned here - >>> http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg19344.html, >>> which indicates a bug with the SDK itself, but no help here too. >>> >>> Code : >>> >>> void MyWeapon::ItemPostFrame() >>> { >>> >>> ? ? ? ?// Burstfire continues for 3 shots after we press fire >>> ? ? ? ?if(cBurstShots) >>> ? ? ? ? ? ? ? ?BurstFire(); >>> ? ? ? ?else >>> ? ? ? ? ? ? ? ?BaseClass::ItemPostFrame(); >>> } >>> >>> void MyWeapon::BurstFire() >>> { >>> ? ? ? ?if (!m_iClip1) >>> ? ? ? ?{ >>> ? ? ? ? ? ? ? ?cBurstShots = 0; >>> ? ? ? ? ? ? ? ?return; >>> ? ? ? ?} >>> >>> ? ? ? ?if (tNextBurst> ?gpGlobals->curtime) >>> ? ? ? ? ? ? ? ?return; >>> >>> #ifdef CLIENT_DLL >>> ? ? ? ? if ( prediction->InPrediction()&& >>> ?!prediction->IsFirstTimePredicted() ) >>> ? ? ? ? ? ? ? ? return; >>> #endif >>> >>> #ifdef CLIENT_DLL >>> ? ? ? ?DevMsg("Time : %f cBurstShots : %d tNextBurst : %f\n", >>> gpGlobals->curtime, cBurstShots, tNextBurst); >>> #endif >>> >>> ? ? ? ?// making this NOT relative to curtime means it won't be totally >>> cpu/tickrate dependent >>> ? ? ? ?tNextBurst += info.m_tReloadChamber; >>> >>> ? ? ? ?--cBurstShots; >>> >>> ? ? ? ?Fire(); >>> >>> ? ? ? ?m_flNextPrimaryAttack = m_flNextSecondaryAttack = >>> gpGlobals->curtime + 0.1; >>> >>> ? ? ? ?WeaponSound( SINGLE ); >>> ? ? ? ?DoMuzzleFlash(); >>> } >>> >>> >>> void MyWeapon::PrimaryAttack() >>> { >>> ? ? ? ?if (!fBurstMode) >>> ? ? ? ? { >>> ? ? ? ? ? ? ? ?Fire(); >>> ? ? ? ? ? ? ? ?return; >>> ? ? ? ?} >>> >>> ? ? ? ?cBurstShots = 3; >>> ? ? ? ?tNextBurst = gpGlobals->curtime; >>> ? ? ? ?SendWeaponAnim( ACT_VM_PRIMARYATTACK ); >>> } >>> >>> _______________________________________________ >>> 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 >> >> > > > > ------------------------------ > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > End of hlcoders Digest, Vol 4, Issue 4 > ************************************** > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders