From 7e155754d6adf0e80f700c17518bc2d18bb88bd8 Mon Sep 17 00:00:00 2001 From: Teetime Date: Fri, 14 Oct 2011 00:34:31 +0200 Subject: new mode (grenade) --- src/game/server/entities/character.cpp | 5 +++++ src/game/server/gamemodes/zcatch.cpp | 3 +++ src/game/variables.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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") -- cgit 1.4.1