about summary refs log tree commit diff
path: root/src/game/server/gamemodes/zcatch.cpp
diff options
context:
space:
mode:
authorTeetime <anton.tsoulos@yahoo.de>2011-10-14 16:39:22 +0200
committerTeetime <anton.tsoulos@yahoo.de>2011-10-14 16:39:22 +0200
commite13cb835f6e02aec2198a4c30bdbde7f47f12985 (patch)
tree5535835eb3a0ab0a934784c3a57135e0ec8d99c4 /src/game/server/gamemodes/zcatch.cpp
parentbd0bbcf4464a5cb9570c4cd3a3c1f347fa3cff66 (diff)
downloadzcatch-e13cb835f6e02aec2198a4c30bdbde7f47f12985.tar.gz
zcatch-e13cb835f6e02aec2198a4c30bdbde7f47f12985.zip
changed scoring a bit
Diffstat (limited to 'src/game/server/gamemodes/zcatch.cpp')
-rw-r--r--src/game/server/gamemodes/zcatch.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/server/gamemodes/zcatch.cpp b/src/game/server/gamemodes/zcatch.cpp
index 2c9370e4..a112ac04 100644
--- a/src/game/server/gamemodes/zcatch.cpp
+++ b/src/game/server/gamemodes/zcatch.cpp
@@ -2,10 +2,7 @@
 /* If you are missing that file, acquire a complete release at teeworlds.com.                */
 /* zCatch by erd and Teetime */
 
-#include <engine/server.h>
 #include <engine/shared/config.h>
-#include <game/server/entities/character.h>
-#include <game/server/player.h>
 #include <game/server/gamecontext.h>
 #include "zcatch.hpp"
 
@@ -69,6 +66,7 @@ int CGameController_zCatch::OnCharacterDeath(class CCharacter *pVictim, class CP
 		pVictim->GetPlayer()->m_Deaths++; 
 		
 		pKiller->m_Score++;
+		pVictim->GetPlayer()->m_Score--;
 		
 		/* Check if the killer is already killed and in spectator (victim may died through wallshot) */
 		if(pKiller->GetTeam() != TEAM_SPECTATORS)
@@ -83,6 +81,12 @@ int CGameController_zCatch::OnCharacterDeath(class CCharacter *pVictim, class CP
 			GameServer()->SendChatTarget(VictimID, buf);
 		}
 	}
+	else
+	{
+		//Punish selfkill/death
+		if(WeaponID == WEAPON_SELF || WeaponID == WEAPON_WORLD)
+			pVictim->GetPlayer()->m_Score -= 15;
+	}
 	
 	for(int i=0; i < MAX_CLIENTS; i++)
 	{