From 834f9dbd105502efd448d7cf82b96011807d1a8f Mon Sep 17 00:00:00 2001 From: Olle Rosenquist Date: Sun, 22 Jul 2007 12:32:57 +0000 Subject: [PATCH] No friendly fire in tdm --- src/game/server/game_server.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/server/game_server.cpp b/src/game/server/game_server.cpp index fc8718fbe..9ca153fd0 100644 --- a/src/game/server/game_server.cpp +++ b/src/game/server/game_server.cpp @@ -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;