about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authorTeetime <anton.tsoulos@yahoo.de>2011-10-14 00:34:31 +0200
committerTeetime <anton.tsoulos@yahoo.de>2011-10-14 00:34:31 +0200
commit7e155754d6adf0e80f700c17518bc2d18bb88bd8 (patch)
treea02783f007e9e508f34ef9d61344cfd7ead24bad /src/game
parent8471bc0721196a45ade9f6af174eac8ab82d47bd (diff)
downloadzcatch-7e155754d6adf0e80f700c17518bc2d18bb88bd8.tar.gz
zcatch-7e155754d6adf0e80f700c17518bc2d18bb88bd8.zip
new mode (grenade)
Diffstat (limited to 'src/game')
-rw-r--r--src/game/server/entities/character.cpp5
-rw-r--r--src/game/server/gamemodes/zcatch.cpp3
-rw-r--r--src/game/variables.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp
index d7fd74a8..0e21f9a0 100644
--- a/src/game/server/entities/character.cpp
+++ b/src/game/server/entities/character.cpp
@@ -68,6 +68,11 @@ bool CCharacter::Spawn(CPlayer *pPlayer, vec2 Pos)
 		m_ActiveWeapon = WEAPON_HAMMER;
 		m_LastWeapon = WEAPON_HAMMER;
 	}
+	else if(GameServer()->m_pController->IsZCatch() && g_Config.m_SvMode == 4)
+	{
+		m_ActiveWeapon = WEAPON_GRENADE;
+		m_LastWeapon = WEAPON_GRENADE;
+	}
 	else
 	{
 		m_ActiveWeapon = WEAPON_GUN;
diff --git a/src/game/server/gamemodes/zcatch.cpp b/src/game/server/gamemodes/zcatch.cpp
index f9477bdc..8fe769f2 100644
--- a/src/game/server/gamemodes/zcatch.cpp
+++ b/src/game/server/gamemodes/zcatch.cpp
@@ -122,6 +122,9 @@ void CGameController_zCatch::OnCharacterSpawn(class CCharacter *pChr)
 			case 3:
 				pChr->GiveWeapon(WEAPON_HAMMER, -1);
 				break;
+			case 4:
+				pChr->GiveWeapon(WEAPON_GRENADE, -1);
+				break;
 			}
 }
 void CGameController_zCatch::EndRound()
diff --git a/src/game/variables.h b/src/game/variables.h
index 1791cb7e..69a266ac 100644
--- a/src/game/variables.h
+++ b/src/game/variables.h
@@ -91,7 +91,7 @@ MACRO_CONFIG_INT(DbgTuning, dbg_tuning, 0, 0, 1, CFGFLAG_CLIENT, "")
 #endif
 
 //zCatch:
-MACRO_CONFIG_INT(SvMode, sv_mode, 1, 0, 3, CFGFLAG_SERVER, "0 - Normal; 1 - Instagib; 2 - Rocket area; 3 - Hammerparty")
+MACRO_CONFIG_INT(SvMode, sv_mode, 1, 0, 4, CFGFLAG_SERVER, "0 - Normal; 1 - Instagib; 2 - Rocket area; 3 - Hammerparty; 4 - Grenade")
 MACRO_CONFIG_INT(SvAllowJoin, sv_allow_join, 2, 1, 2, CFGFLAG_SERVER, "Allow new Players to join without waiting for the next round")
 //1 = Allowed to join; 2 = Will join when person with the most kills die
 MACRO_CONFIG_INT(SvColorIndicator, sv_color_indicator, 1, 0, 1, CFGFLAG_SERVER, "Color tees apropriate to the number of currently catched players")