about summary refs log tree commit diff
path: root/src/game/server/srv_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/server/srv_common.cpp')
-rw-r--r--src/game/server/srv_common.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/server/srv_common.cpp b/src/game/server/srv_common.cpp
index 1c338897..21400d63 100644
--- a/src/game/server/srv_common.cpp
+++ b/src/game/server/srv_common.cpp
@@ -145,6 +145,19 @@ void gameobject::do_warmup(int seconds)
 	warmup = seconds*SERVER_TICK_SPEED;
 }
 
+bool gameobject::is_friendly_fire(int cid1, int cid2)
+{
+	if(cid1 == cid2)
+		return false;
+	
+	if(is_teamplay)
+	{
+		if(players[cid1].team == players[cid2].team)
+			return true;
+	}
+	
+	return false;
+}
 
 void gameobject::tick()
 {