about summary refs log tree commit diff
path: root/src/game/server/entities
diff options
context:
space:
mode:
authorTeetime <teetimetw@yahoo.de>2011-11-12 03:55:14 +0100
committerTeetime <teetimetw@yahoo.de>2011-11-12 03:55:14 +0100
commit9fde691e091ebb0178b7e2d65d2d8c9f81214e99 (patch)
tree1e34215f3a2a8a305d7a800ef2b0d8512c07180a /src/game/server/entities
parent3bb01b2ba3b3ecddb39d36ce24a51b1130cb009e (diff)
downloadzcatch-9fde691e091ebb0178b7e2d65d2d8c9f81214e99.tar.gz
zcatch-9fde691e091ebb0178b7e2d65d2d8c9f81214e99.zip
Grenade doesn't kill owner anymore
Diffstat (limited to 'src/game/server/entities')
-rw-r--r--src/game/server/entities/character.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp
index 17aa47ca..7f37a6af 100644
--- a/src/game/server/entities/character.cpp
+++ b/src/game/server/entities/character.cpp
@@ -751,12 +751,15 @@ bool CCharacter::TakeDamage(vec2 Force, int Dmg, int From, int Weapon)
 	/* zCatch */
 	bool Is_zCatch = GameServer()->m_pController->IsZCatch();
 	
-	if(From == m_pPlayer->GetCID())
+	bool FromSelf = From == m_pPlayer->GetCID();
+	if(FromSelf)
+	{
 		if(Is_zCatch && g_Config.m_SvMode != 1)
 			Dmg = 0;	//No selfdamage, except in vanilla-mode
 		// m_pPlayer only inflicts half damage on self
 		else
 			Dmg = max(1, Dmg/2);
+	}
 	/* end zCatch */
 	
 	m_DamageTaken++;
@@ -774,7 +777,7 @@ bool CCharacter::TakeDamage(vec2 Force, int Dmg, int From, int Weapon)
 	}
 	/* zCatch*/
 	//One-Shot-One-Kill
-	if(Is_zCatch && (g_Config.m_SvMode != 0 && g_Config.m_SvMode != 2)) // all except vanilla-mode and all weapons
+	if(Is_zCatch && (g_Config.m_SvMode != 0 && g_Config.m_SvMode != 2 && !FromSelf)) // all except vanilla-mode and all weapons
 	{
 		m_Health = 0;
 		m_Armor = 0;