Fixed ninja: always set last active weapon after ninja's end

This commit is contained in:
nsinreal 2011-06-26 14:17:56 +03:00 committed by oy
parent fb309436b4
commit 66a8000620

View file

@ -120,8 +120,6 @@ void CCharacter::HandleNinja()
// time's up, return // time's up, return
m_aWeapons[WEAPON_NINJA].m_Got = false; m_aWeapons[WEAPON_NINJA].m_Got = false;
m_ActiveWeapon = m_LastWeapon; m_ActiveWeapon = m_LastWeapon;
if(m_ActiveWeapon == WEAPON_NINJA)
m_ActiveWeapon = WEAPON_GUN;
SetWeapon(m_ActiveWeapon); SetWeapon(m_ActiveWeapon);
return; return;
@ -486,7 +484,8 @@ void CCharacter::GiveNinja()
m_Ninja.m_ActivationTick = Server()->Tick(); m_Ninja.m_ActivationTick = Server()->Tick();
m_aWeapons[WEAPON_NINJA].m_Got = true; m_aWeapons[WEAPON_NINJA].m_Got = true;
m_aWeapons[WEAPON_NINJA].m_Ammo = -1; m_aWeapons[WEAPON_NINJA].m_Ammo = -1;
m_LastWeapon = m_ActiveWeapon; if (m_ActiveWeapon != WEAPON_NINJA)
m_LastWeapon = m_ActiveWeapon;
m_ActiveWeapon = WEAPON_NINJA; m_ActiveWeapon = WEAPON_NINJA;
GameServer()->CreateSound(m_Pos, SOUND_PICKUP_NINJA); GameServer()->CreateSound(m_Pos, SOUND_PICKUP_NINJA);