From 309f0644fa81f17d548e9d0d0a25790d07fe4bf7 Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Mon, 24 May 2010 00:00:35 +0000 Subject: [PATCH] bug fix: hitsound git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5027 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 6 +++--- source/src/weapon.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index ec0b1eb7..f3199939 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -621,10 +621,10 @@ void dodamage(int damage, playerent *pl, playerent *actor, bool gib, bool local) pl->respawnoffset = pl->lastpain = lastmillis; - playerent *h = local ? player1 : updatefollowplayer(0); - if(actor==h && pl!=actor) + playerent *h = local ? player1 : updatefollowplayer(0); + if(/*actor==h && pl!=actor*/ pl == player1) { - if(hitsound && lasthit != lastmillis) audiomgr.playsound(S_HITSOUND); + if(hitsound && lasthit != lastmillis) audiomgr.playsound(S_HITSOUND, SP_LOW); lasthit = lastmillis; } diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index 137c703c..2f37bd1d 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -335,13 +335,13 @@ void hit(int damage, playerent *d, playerent *at, const vec &vel, int gun, bool { if(d==player1 || d->type==ENT_BOT || !m_mp(gamemode)) d->hitpush(damage, vel, at, gun); - if(at==player1 && d!=player1) - { - extern int hitsound; - extern int lasthit; - if(hitsound && lasthit != lastmillis) audiomgr.playsound(S_HITSOUND); - lasthit = lastmillis; - } +// if(at!=player1 && d==player1) +// { +// extern int hitsound; +// extern int lasthit; +// if(hitsound && lasthit != lastmillis) audiomgr.playsound(S_HITSOUND); +// lasthit = lastmillis; +// } if(!m_mp(gamemode)) dodamage(damage, d, at, gib); else