No friendly fire in tdm

This commit is contained in:
Olle Rosenquist 2007-07-22 12:32:57 +00:00
parent 4b51139425
commit 834f9dbd10

View file

@ -1221,6 +1221,9 @@ bool player::take_damage(vec2 force, int dmg, int from, int weapon)
// create healthmod indicator // create healthmod indicator
create_damageind(pos, normalize(force), dmg); create_damageind(pos, normalize(force), dmg);
if (gameobj.gametype == GAMETYPE_TDM && from >= 0 && players[from].team == team)
return false;
if(armor) if(armor)
{ {
armor -= 1; armor -= 1;