diff --git a/AUTHORS b/AUTHORS index f81e2832..314af589 100644 --- a/AUTHORS +++ b/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. diff --git a/Resources/Sounds/Feedback/HeadshotFeedback.opus b/Resources/Sounds/Feedback/HeadshotFeedback.opus new file mode 100644 index 00000000..62d347f9 Binary files /dev/null and b/Resources/Sounds/Feedback/HeadshotFeedback.opus differ diff --git a/Sources/Client/Client_Update.cpp b/Sources/Client/Client_Update.cpp index b47a14c7..cd1e7cf2 100644 --- a/Sources/Client/Client_Update.cpp +++ b/Sources/Client/Client_Update.cpp @@ -957,7 +957,15 @@ namespace spades { if (by == world->GetLocalPlayer() && hurtPlayer) { net->SendHit(hurtPlayer->GetId(), type); - + + if (type == HitTypeHead) { + Handle 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; diff --git a/Sources/Gui/Credits.inc b/Sources/Gui/Credits.inc index a9cae52c..b1310bdc 100644 --- a/Sources/Gui/Credits.inc +++ b/Sources/Gui/Credits.inc @@ -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.