Add a headshot bang sound like in classic (#648)
* Add satisfying headshot bangs like in classic * add whack sound * Update Client_Update.cpp * Add files via upload * Moved to Resources/Sounds/Feedback * Play only if inflicted by LocalPlayer Also lowered volume * Update AUTHORS * Update Credits.inc
This commit is contained in:
parent
d8916aa5ca
commit
0cb053c15d
1
AUTHORS
1
AUTHORS
@ -16,6 +16,7 @@ Credits
|
||||
"Mailaender" - FreeDesktop definitions fixes
|
||||
"Chameleonhider" - Configurable player name drawing
|
||||
"CenturionFox" - Server Disconnect Screen
|
||||
"teodor6140" - Headshot feedback "whack" sound
|
||||
|
||||
And many others which weren't mentioned here.
|
||||
|
||||
|
BIN
Resources/Sounds/Feedback/HeadshotFeedback.opus
Normal file
BIN
Resources/Sounds/Feedback/HeadshotFeedback.opus
Normal file
Binary file not shown.
@ -957,7 +957,15 @@ namespace spades {
|
||||
|
||||
if (by == world->GetLocalPlayer() && hurtPlayer) {
|
||||
net->SendHit(hurtPlayer->GetId(), type);
|
||||
|
||||
|
||||
if (type == HitTypeHead) {
|
||||
Handle<IAudioChunk> c =
|
||||
audioDevice->RegisterSound("Sounds/Feedback/HeadshotFeedback.opus");
|
||||
AudioParam param;
|
||||
param.volume = 10.f;
|
||||
audioDevice->Play(c, hitPos, param);
|
||||
}
|
||||
|
||||
hitFeedbackIconState = 1.f;
|
||||
if (hurtPlayer->GetTeamId() == world->GetLocalPlayer()->GetTeamId()) {
|
||||
hitFeedbackFriendly = true;
|
||||
|
@ -24,6 +24,7 @@ Credits
|
||||
"CenturionFox" - Server Disconnect Screen
|
||||
"DarkDracoon" - European Portuguese translation
|
||||
"BrunoDiazU" - Spanish translation
|
||||
"teodor6140" - Headshot feedback "whack" sound
|
||||
|
||||
And many others which weren't mentioned here.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user