mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fixed ninja: always set last active weapon after ninja's end
This commit is contained in:
parent
fb309436b4
commit
66a8000620
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue