From 5081d081c9b29ad8d5df6145764ca1a432535e54 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Fri, 26 Jul 2024 23:21:00 +0300 Subject: [PATCH] CInfClassInfected: Refactor GiveClassAttributes() --- src/game/server/infclass/classes/infected/infected.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game/server/infclass/classes/infected/infected.cpp b/src/game/server/infclass/classes/infected/infected.cpp index cc8ac6e91..14ddd43fd 100644 --- a/src/game/server/infclass/classes/infected/infected.cpp +++ b/src/game/server/infclass/classes/infected/infected.cpp @@ -653,8 +653,13 @@ void CInfClassInfected::GiveClassAttributes() return; } - m_pCharacter->GiveWeapon(WEAPON_HAMMER, -1); - m_pCharacter->SetActiveWeapon(WEAPON_HAMMER); + switch(GetPlayerClass()) + { + default: + m_pCharacter->GiveWeapon(WEAPON_HAMMER, -1); + m_pCharacter->SetActiveWeapon(WEAPON_HAMMER); + break; + } m_VoodooAboutToDie = false; m_VoodooTimeAlive = Server()->TickSpeed()*Config()->m_InfVoodooAliveTime;