diff options
| author | Teetime <anton.tsoulos@yahoo.de> | 2011-10-14 00:48:47 +0200 |
|---|---|---|
| committer | Teetime <anton.tsoulos@yahoo.de> | 2011-10-14 00:48:47 +0200 |
| commit | 35198a95e8d31a39113f16f5104ff0b1a0ec6e9f (patch) | |
| tree | 5e6abd10bc3be1463ec76083949c039e77b788da /src/game/server/entities | |
| parent | 7e155754d6adf0e80f700c17518bc2d18bb88bd8 (diff) | |
| download | zcatch-35198a95e8d31a39113f16f5104ff0b1a0ec6e9f.tar.gz zcatch-35198a95e8d31a39113f16f5104ff0b1a0ec6e9f.zip | |
Give all weapons (except vanilla) full ammo and make one shot one kill
Diffstat (limited to 'src/game/server/entities')
| -rw-r--r-- | src/game/server/entities/character.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 0e21f9a0..5ab5a5f5 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -466,7 +466,7 @@ void CCharacter::HandleWeapons() // ammo regen int AmmoRegenTime = g_pData->m_Weapons.m_aId[m_ActiveWeapon].m_Ammoregentime; - if(AmmoRegenTime && (m_ActiveWeapon == WEAPON_GUN || (GameServer()->m_pController->IsZCatch() && g_Config.m_SvMode == 2))) //zCatch + if(AmmoRegenTime) { // If equipped and not active, regen ammo? if (m_ReloadTimer <= 0) @@ -729,11 +729,18 @@ bool CCharacter::TakeDamage(vec2 Force, int Dmg, int From, int Weapon) if(GameServer()->m_pController->IsFriendlyFire(m_pPlayer->GetCID(), From) && !g_Config.m_SvTeamdamage) return false; - - // m_pPlayer only inflicts half damage on self + + /* zCatch */ + bool Is_zCatch = GameServer()->m_pController->IsZCatch(); + if(From == m_pPlayer->GetCID()) - Dmg = max(1, Dmg/2); - + 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++; // create healthmod indicator @@ -747,8 +754,9 @@ bool CCharacter::TakeDamage(vec2 Force, int Dmg, int From, int Weapon) m_DamageTaken = 0; GameServer()->CreateDamageInd(m_Pos, 0, Dmg); } - /* zCatch*/ - if(GameServer()->m_pController->IsZCatch() && (g_Config.m_SvMode == 1 || g_Config.m_SvMode == 3)) + /* 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 { m_Health = 0; m_Armor = 0; |