mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
No friendly fire in tdm
This commit is contained in:
parent
4b51139425
commit
834f9dbd10
|
@ -1221,6 +1221,9 @@ bool player::take_damage(vec2 force, int dmg, int from, int weapon)
|
|||
// create healthmod indicator
|
||||
create_damageind(pos, normalize(force), dmg);
|
||||
|
||||
if (gameobj.gametype == GAMETYPE_TDM && from >= 0 && players[from].team == team)
|
||||
return false;
|
||||
|
||||
if(armor)
|
||||
{
|
||||
armor -= 1;
|
||||
|
|
Loading…
Reference in a new issue