mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fixed infinite Loop
Don't tell Oy to add this, he will just say we don't support mods
This commit is contained in:
parent
09068d91a4
commit
c1ebccd8a2
|
@ -223,6 +223,12 @@ void CCharacter::HandleWeaponSwitch()
|
|||
if(m_QueuedWeapon != -1)
|
||||
WantedWeapon = m_QueuedWeapon;
|
||||
|
||||
bool Anything;
|
||||
for(int i = 0; i < NUM_WEAPONS - 1; ++i)
|
||||
if(m_aWeapons[i].m_Got)
|
||||
Anything = true;
|
||||
if(!Anything)
|
||||
return;
|
||||
// select Weapon
|
||||
int Next = CountInput(m_LatestPrevInput.m_NextWeapon, m_LatestInput.m_NextWeapon).m_Presses;
|
||||
int Prev = CountInput(m_LatestPrevInput.m_PrevWeapon, m_LatestInput.m_PrevWeapon).m_Presses;
|
||||
|
|
Loading…
Reference in a new issue