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
master
Teodor 2017-09-05 12:27:05 +03:00 committed by YVT
parent d8916aa5ca
commit 0cb053c15d
4 changed files with 11 additions and 1 deletions

View File

@ -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.

Binary file not shown.

View File

@ -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;

View File

@ -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.