hitsound usage

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4323 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
flowtron
2009-04-11 11:23:39 +00:00
parent a89e07426e
commit 28e55641c9
4 changed files with 113 additions and 90 deletions
+8
View File
@@ -312,6 +312,14 @@ 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(!m_mp(gamemode)) dodamage(damage, d, at, gib);
else
{