fix singleplayer frag-gibs and the old head shot sound bug (thanks to Kirin for the tip)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5267 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-07-02 21:47:46 +00:00
parent 229cc9a378
commit d2fe51c0f8
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -652,7 +652,7 @@ void dodamage(int damage, playerent *pl, playerent *actor, bool gib, bool local)
}
damageeffect(damage, pl);
if(pl->health<=0) { if(local) dokill(pl, actor, gib, pl->weaponsel->type); }
if(pl->health<=0) { if(local) dokill(pl, actor, gib, actor->weaponsel->type); }
else if(pl==player1) audiomgr.playsound(S_PAIN6, SP_HIGH);
else audiomgr.playsound(S_PAIN1+rnd(5), pl);
}
@@ -682,14 +682,14 @@ void dokill(playerent *pl, playerent *act, bool gib, int gun)
if(gib)
{
if(pl!=act && /*act->weaponsel->type*/ gun == GUN_SNIPER) audiomgr.playsound(S_HEADSHOT, SP_LOW);
if(pl!=act && gun == GUN_SNIPER) audiomgr.playsound(S_HEADSHOT, SP_LOW);
addgib(pl);
}
if(!m_mp(gamemode))
{
if(pl==act || isteam(pl->team, act->team)) act->frags--;
else act->frags += gib ? 2 : 1;
else act->frags += ( gib && gun != GUN_GRENADE && gun != GUN_SHOTGUN) ? 2 : 1;
}
deathstate(pl);