Raised This Month: $12 Target: $400
 3% 

[TUT] Replace Weapon Firing Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-01-2017 , 17:08   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #11

Best way is to hook emit sound forward...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-01-2017 , 18:35   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #12

Quote:
Originally Posted by Natsheh View Post
Best way is to hook emit sound forward...
That doesn't work for guns.
klippy is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-01-2017 , 21:18   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #13

Quote:
Originally Posted by KliPPy View Post
That doesn't work for guns.
thats akward it worked with a knife ?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 08-01-2017 , 21:20   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #14

Quote:
Originally Posted by Natsheh View Post
thats akward it worked with a knife ?
It does work with the knife. But the knife ain't gun, right?
klippy is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-02-2017 , 01:18   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #15

Quote:
Originally Posted by KliPPy View Post
It does work with the knife. But the knife ain't gun, right?
Its a weapon...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-02-2017 , 04:59   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #16

Quote:
Originally Posted by KliPPy View Post
That doesn't work for guns.
He said guns, not weapons.
__________________

Last edited by HamletEagle; 08-02-2017 at 05:00.
HamletEagle is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-04-2017 , 21:38   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #17

Quote:
Originally Posted by Natsheh View Post
thats akward it worked with a knife ?
Weapons shoot sounds are handled on client-side in exception of knife.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-07-2017 , 02:50   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #18

Quote:
Originally Posted by meTaLiCroSS View Post
So, you haven't tested this?
I did test it some time ago.. it should be fine and now..

Quote:
It works pretty good in first person. But like all other methods, not when others are shooting.
When spraying you can sometimes make out the beginning of the original sound.
I didn't test when other players were shooting, but i will these days, but in theory it should work and when others are shooting too, the initial sound should be cut, but there may be some delay depending on the player's ping.. the only way to fix it would be to recreate the weapon firing function, which would be a little CPU expensive..

Ofc this could be done much better and more efficiently using Reverse Engineered Trio ( ReHLDS + ReGame + ReAPI )
but for that you should ask prostostem@ since he has better knowledge of how the game works..
__________________

Last edited by Depresie; 08-07-2017 at 03:01.
Depresie is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2017 , 10:36   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #19

Quote:
Originally Posted by Depresie View Post
I didn't test when other players were shooting, but i will these days, but in theory it should work and when others are shooting too, the initial sound should be cut, but there may be some delay depending on the player's ping.. the only way to fix it would be to recreate the weapon firing function, which would be a little CPU expensive..
I did test it using podbot so that might be the issue.
Black Rose is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-10-2017 , 23:36   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #20

Quote:
Originally Posted by Depresie View Post
the only way to fix it would be to recreate the weapon firing function, which would be a little CPU expensive..
Yeah, you might note you did a wrong research.

Whenever you post an snippet you should be fully sure of its functionality. Also, don't test on a listen server, test with on a dedicated one.

Weapons fire sound are handled client-side, this means there's no server code associated to the fire sound. The only association you can assume, is that clients listen to the shoot sound because it's sent to them by its respective PlayBack event (you can send a fire sound after this callback is triggered to override the sound played, you can see code reference on HLSDK, cl_dlls). The player who fires the weapon predicts the sound, and as you know, prediction is what it is: A PREDICTION, it's not synchronized with the server, and this sound could be easily skippable, depending on certain factors.

The only accurate snippet to change this fire sound correctly must be the weapon prediction override.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode