about summary refs log tree commit diff
path: root/src/game/server/srv_common.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-11 21:19:52 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-11 21:19:52 +0000
commit094a019149269e2c6efcc729a5c24ca728a07c98 (patch)
treee62ec744e65336fc83f41a5273a0bf4f6f57abe2 /src/game/server/srv_common.cpp
parenta4a0eb3a5a94cafae8876c6710236d4559bdfb47 (diff)
downloadzcatch-094a019149269e2c6efcc729a5c24ca728a07c98.tar.gz
zcatch-094a019149269e2c6efcc729a5c24ca728a07c98.zip
fixed player scoring in CTF
Diffstat (limited to 'src/game/server/srv_common.cpp')
-rw-r--r--src/game/server/srv_common.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/server/srv_common.cpp b/src/game/server/srv_common.cpp
index d3d9855c..14cabaf3 100644
--- a/src/game/server/srv_common.cpp
+++ b/src/game/server/srv_common.cpp
@@ -134,9 +134,14 @@ int gameobject::on_player_death(class player *victim, class player *killer, int
 	if(!killer)
 		return 0;
 	if(killer == victim)
-		victim->score--; // klant arschel
+		victim->score--; // suicide
 	else
-		killer->score++; // good shit
+	{
+		if(is_teamplay && victim->team == killer->team)
+			killer->score--; // teamkill
+		else
+			killer->score++; // normal kill
+	}
 	return 0;
 }