AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Damage Sound v2.1 (aka hitsound) (https://forums.alliedmods.net/showthread.php?t=99552)

Whosat 09-02-2009 05:58

Re: Damage Sound
 
Quote:

Originally Posted by Chanz (Post 906907)
updated to 1.3.23 see first post for changelog.

(added the dystopia hitsound effect)

Awesome!
Only problem is when you light the tank on fire.
When it dies, the sound spams like crazy (quite lol)

Chanz 09-02-2009 06:33

Re: Damage Sound
 
Quote:

Originally Posted by Whosat (Post 920644)
Awesome!
Only problem is when you light the tank on fire.
When it dies, the sound spams like crazy (quite lol)

What tank? L4D? hmm since I don't have L4D I can't test it and it surprises me that npcs trigger the hurt event. O_o

Dominator 09-02-2009 12:08

Re: Damage Sound
 
That happens as well with TF2 when a pyro lights someone on fire. Also people can tell who is a disguesed spy by randomly shooting their team mates.

Thanks for the request in adding a menu in the future, that will be really great!

Willamet 09-02-2009 18:56

Re: Damage Sound
 
Can you make a way for the sound to dissable on pyros, or to use a different sound, because it spams like crazy, and is REALLY annoying.

berni 09-10-2009 16:02

Re: Damage Sound
 
Seems ok, approved :)

Chanz 09-10-2009 17:56

Re: Damage Sound
 
Quote:

Originally Posted by Dominator (Post 920983)
That happens as well with TF2 when a pyro lights someone on fire. Also people can tell who is a disguesed spy by randomly shooting their team mates.

Thanks for the request in adding a menu in the future, that will be really great!

oh ok give me some time, I update it as soon as possible.

Quote:

Originally Posted by berni (Post 929086)
Seems ok, approved :)

thx :)

StrikerMan780 09-28-2009 22:02

Re: Damage Sound
 
I apologize for the bump, but I am having some problems, I added:

sm_damagesound_path "misc/hitlo.wav"
sm_damagesound_pitch "1"
sm_damagesound_pitch_time "1.0"
sm_damagesound_volume "0.8"

To my listenserver.cfg, but they don't seem to be taking effect in the game. Typing them manually works, or executing the config once the map loads, but that is a pain to do all of the time.

EDIT: It appears to lose the settings between maps too, and when people connect, they don't download the hit sound. Might wanna fix that.

Chanz 09-29-2009 17:19

Re: Damage Sound
 
I don't know about listenservers but try to insert that stuff into your server.cfg or autoexec.cfg then it should be executed to 99%. If it then still does not work I try to find the bug.

StrikerMan780 09-29-2009 18:55

Re: Damage Sound
 
Tried, doesn't seem to stick. Thanks for the quick reply btw.

Darkhand 09-29-2009 21:59

Re: Damage Sound
 
Oddly I'm having the same problem on a listenserver when testing it out. It's retaining the very first cvar settings that were used when I first ran the plugin. No matter what I set the default to in the source, it gets changed to what it was when I first ran it. For example, if I set the default for sm_damagesound_pitch to 1 in the source and recompile, and then poll the cvar in game it shows: "sm_damagesound_pitch 0 (def 1)". It's like something is changing the cvar after the fact. Very odd, no other plugins do that, even on a listen server.

Anyway, the mod I'm using this on has very few shots before player death. I couldn't really hear the pitch increasing much before the player died, he was dead before it went up more than a few increments. So I increased the pitch counter to go up by 10 per hit instead of 1. The problem now is that in some very rare cases I'm going above 255 pitch and getting pitch out of bound errors. I tried limiting hitCounter to 255 as below, but not having much luck. Any ideas?

Code:

        if(GetConVarBool(cvar_soundpitch)){
            hitCounter[client][attacker] = hitCounter[client][attacker] + 10;
               
            if(hitCounter[client][attacker] > 255){  // Sanity Check, don't let
                hitCounter[client][attacker] = 255;  // pitch value go above 255
            }
        }

EDIT: I'm a newb. The pitch value is already 100 by default... adding 255 to that gives you 355. I changed 255 in the snippet above to 155 and it works perfectly. You might want to add that pitch sanity check into the default version; you never know if some mod will get the sound up past 255, even if it is just adding to the pitch 1 at a time.

EDIT EDIT: Figured out the listenserver issue as well, I didn't notice it writes its own config file... it's just pulling the original defaults that were first created in moddir/cfg/sourcemod/damagesound.cfg. I'm definitely a newb. :) Strikerman, modify or delete the config file and you'll be good.

One feature I'd like to request is the ability for users to enable or disable the sound for themselves, possibly through a clientpref? So far, most users are thrilled with the mod, but a few find it annoying.


All times are GMT -4. The time now is 08:26.

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