about summary refs log tree commit diff
path: root/src/game/server/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/server/entities')
-rw-r--r--src/game/server/entities/character.cpp33
1 files changed, 28 insertions, 5 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp
index e926c305..d7fd74a8 100644
--- a/src/game/server/entities/character.cpp
+++ b/src/game/server/entities/character.cpp
@@ -56,8 +56,25 @@ bool CCharacter::Spawn(CPlayer *pPlayer, vec2 Pos)
 {
 	m_EmoteStop = -1;
 	m_LastAction = -1;
-	m_ActiveWeapon = WEAPON_GUN;
-	m_LastWeapon = WEAPON_HAMMER;
+	
+	/*zCatch */
+	if(GameServer()->m_pController->IsZCatch() && g_Config.m_SvMode == 1)
+	{
+		m_ActiveWeapon = WEAPON_RIFLE;
+		m_LastWeapon = WEAPON_RIFLE;
+	}
+	else if(GameServer()->m_pController->IsZCatch() && g_Config.m_SvMode == 3)
+	{
+		m_ActiveWeapon = WEAPON_HAMMER;
+		m_LastWeapon = WEAPON_HAMMER;
+	}
+	else
+	{
+		m_ActiveWeapon = WEAPON_GUN;
+		m_LastWeapon = WEAPON_HAMMER;
+	}
+    /* end zCatch */
+	
 	m_QueuedWeapon = -1;
 
 	m_pPlayer = pPlayer;
@@ -444,7 +461,7 @@ void CCharacter::HandleWeapons()
 
 	// ammo regen
 	int AmmoRegenTime = g_pData->m_Weapons.m_aId[m_ActiveWeapon].m_Ammoregentime;
-	if(AmmoRegenTime)
+	if(AmmoRegenTime && (m_ActiveWeapon == WEAPON_GUN || (GameServer()->m_pController->IsZCatch() && g_Config.m_SvMode == 2))) //zCatch
 	{
 		// If equipped and not active, regen ammo?
 		if (m_ReloadTimer <= 0)
@@ -725,8 +742,14 @@ bool CCharacter::TakeDamage(vec2 Force, int Dmg, int From, int Weapon)
 		m_DamageTaken = 0;
 		GameServer()->CreateDamageInd(m_Pos, 0, Dmg);
 	}
-
-	if(Dmg)
+	/* zCatch*/ 
+	if(GameServer()->m_pController->IsZCatch() && (g_Config.m_SvMode == 1 || g_Config.m_SvMode == 3))
+	{
+		m_Health = 0;
+		m_Armor = 0;
+	}
+	/* end zCatch*/
+	else if(Dmg)
 	{
 		if(m_Armor)
 		{