From 0cb053c15d6a8e7ea61c432cdaa9107d691aff27 Mon Sep 17 00:00:00 2001 From: Teodor Date: Tue, 5 Sep 2017 12:27:05 +0300 Subject: [PATCH] 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 --- AUTHORS | 1 + Resources/Sounds/Feedback/HeadshotFeedback.opus | Bin 0 -> 8333 bytes Sources/Client/Client_Update.cpp | 10 +++++++++- Sources/Gui/Credits.inc | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Resources/Sounds/Feedback/HeadshotFeedback.opus 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 0000000000000000000000000000000000000000..62d347f94409db4158c587d787cddab4b9fd859f GIT binary patch literal 8333 zcmeHpWlSAF+br(xTAbqU?gfe!cXyZ4;_lAD-41qeD-?GrZpGbQ4-`1S*S_D){dxc2 zf++)LCNu#EcloA-}UUI zckFk}hxf|vhSH+q;>wERlA;n|S#enr5LjMTR#ji#P&u}Ec>Ep(34B>jrOYg|U@X@& zv=!4gS=HE6VjA{2$kkJg`_|$mpDj#dNc3D=MR1Zfx5RP`JHX8&%fE@XPM;iuT`21u zAR_2GOfQx1ok`0qe4QSjsH1`?OYdk%8DsaS-gSmsF4CG*)t=t)gV<31F5B%>uTq!I zGLDEcn3YIA{jqbI2{S@Wjie&GRhFKiiQ z?Q0tq^#8mdXhmt|+x=hIr_lDoo8CIdc(6?4ywi>#k%6){enF?$x=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HPKu44OWj||ZUn%mWtr-^7W zu^}DCNci14hAi4m=zHC(BWv}#!yhi)frF+THeZ+wYjr5|oXG|)cGGg$VOI(zbx*#) zA;xo|jTnwZygTE9uP#iUwF;k|rNSVRc8eeN+L4eW4*f*Xn!k5kAt_x+Fw)F1w)r%t z8Sal%kEs;DPU-WYTC})QRGBM1Sn;mrPwZCLpFv6Z>JW|C@sHB~cM%T8nTzdH2hiTuSFa0EbejT)CoXBS%g0f1*E~tKf{|YR z__YI3L-JucxasXz5o08)6;R+4vw(&^+x(N{mbgzj#Z-l@>0nP}U0wya_uwW!!@dq2 z5QFfBUzdFtG@qiD9bd^g)@E%IzDUw~X3j=IQK>pLRCHHe(^MN&fmB(D$}~s7mJq}& zC3*1W^&<(QS9N2~?||+!1BmZcIcCMzL$9;XVvWsGT2M>e_D%%-Ill&P!u=x(Y^{RX zY8YWBNWhyP_$g+q;wCHdPH=yl>;PrJnjO5d|Htk5x$n*Pe;zRHswKvx8+iuur zw{&}eNA?UXW6vcX+#kQRv zKmlUk#8(QV_BiwFB{wZ^x$)1z7=zvRihv95r&5U&_H_!LC6}?r^P{J%w4Wn;so{L& zK0N1{Ji{^gM($OVTjl6O9<(`Y3n=_B8HF%sXkVqgEzOIpJ-1T=f#nxk<0X^xx=!ov z=1-0rNYUO#h)^%P3D=&t0zod+97Zr@%DZ|XLZ-;e+nq{5nO$b= yF(i(*9J+@XRvjg1lBb83vGetLocalPlayer() && 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.