about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
authorTeetime <anton.tsoulos@yahoo.de>2011-10-14 15:51:14 +0200
committerTeetime <anton.tsoulos@yahoo.de>2011-10-14 15:51:14 +0200
commitbd0bbcf4464a5cb9570c4cd3a3c1f347fa3cff66 (patch)
tree360d108c99688a345363918bbebd12656e197bca /src/game/server
parentf4a97c596219f2a87c4562643119754db6db77c0 (diff)
downloadzcatch-bd0bbcf4464a5cb9570c4cd3a3c1f347fa3cff66.tar.gz
zcatch-bd0bbcf4464a5cb9570c4cd3a3c1f347fa3cff66.zip
new mode: ninja
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/entities/character.cpp19
-rw-r--r--src/game/server/gamemodes/zcatch.cpp3
2 files changed, 15 insertions, 7 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp
index 5ab5a5f5..06c1c913 100644
--- a/src/game/server/entities/character.cpp
+++ b/src/game/server/entities/character.cpp
@@ -137,16 +137,21 @@ void CCharacter::HandleNinja()
 	if(m_ActiveWeapon != WEAPON_NINJA)
 		return;
 
-	if ((Server()->Tick() - m_Ninja.m_ActivationTick) > (g_pData->m_Weapons.m_Ninja.m_Duration * Server()->TickSpeed() / 1000))
+	/* zCatch */
+	if(GameServer()->m_pController->IsZCatch() == false || (GameServer()->m_pController->IsZCatch() && g_Config.m_SvMode == 0))
 	{
-		// time's up, return
-		m_aWeapons[WEAPON_NINJA].m_Got = false;
-		m_ActiveWeapon = m_LastWeapon;
+		if ((Server()->Tick() - m_Ninja.m_ActivationTick) > (g_pData->m_Weapons.m_Ninja.m_Duration * Server()->TickSpeed() / 1000))
+		{
+			// time's up, return
+			m_aWeapons[WEAPON_NINJA].m_Got = false;
+			m_ActiveWeapon = m_LastWeapon;
 
-		SetWeapon(m_ActiveWeapon);
-		return;
+			SetWeapon(m_ActiveWeapon);
+			return;
+		}
 	}
-
+	/* zCatch end*/
+	
 	// force ninja Weapon
 	SetWeapon(WEAPON_NINJA);
 
diff --git a/src/game/server/gamemodes/zcatch.cpp b/src/game/server/gamemodes/zcatch.cpp
index 451bab58..2c9370e4 100644
--- a/src/game/server/gamemodes/zcatch.cpp
+++ b/src/game/server/gamemodes/zcatch.cpp
@@ -176,6 +176,9 @@ void CGameController_zCatch::OnCharacterSpawn(class CCharacter *pChr)
 			case 4:
 				pChr->GiveWeapon(WEAPON_GRENADE, -1);
 				break;
+			case 5:
+				pChr->GiveNinja();
+				break;
 		}
 	//Update color of spawning tees
 	OnPlayerInfoChange(pChr->GetPlayer());