hitsound 2

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7595 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2013-10-12 07:54:05 +00:00
parent 0a9ac3f398
commit ffe23e79d7
2 changed files with 13 additions and 9 deletions
+11 -7
View File
@@ -406,13 +406,17 @@ 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 == 2 && lasthit != lastmillis)
{
defformatstring(hitsnd)("sound %d %d;", S_HITSOUND, SP_HIGHEST);
addsleep(60, hitsnd);
}
lasthit = lastmillis;
}
if(!m_mp(gamemode)) dodamage(damage, d, at, gun, gib);
else