From 4d2ee25bfb925ca1aa138f5ebd598fb48778bede Mon Sep 17 00:00:00 2001 From: ZombieToad <25847476+ZombieToad@users.noreply.github.com> Date: Tue, 26 Jun 2018 19:45:40 +0100 Subject: [PATCH] fix Pain weapons bug https://cdn.discordapp.com/attachments/293493549758939136/461236206131478538/PainWeaponBug.gif because I'm new to coding it took me 2 hours to find this bug. I spent a while looking at the POWERUP_ARMOR and RemoveNinja() code wondering why it didn't work. this bug is funny to some players so maybe you don't want to fix it. i wont mind because it was a challange for me to find it --- src/game/server/entities/character.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 334a7bc1d..dd13abba8 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -272,7 +272,7 @@ void CCharacter::HandleNinja() void CCharacter::DoWeaponSwitch() { // make sure we can switch - if(m_ReloadTimer != 0 || m_QueuedWeapon == -1 || m_aWeapons[WEAPON_NINJA].m_Got) + if(m_ReloadTimer != 0 || m_QueuedWeapon == -1 || m_aWeapons[WEAPON_NINJA].m_Got || !m_aWeapons[m_QueuedWeapon].m_Got) return; // switch Weapon