- if(!client_hasweapon(it, PS(it).m_weapon, true, false))
- PS(it).m_switchweapon = w_getbestweapon(it);
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ .entity weaponentity = weaponentities[slot];
+ if(it.(weaponentity).m_weapon == WEP_Null && slot != 0)
+ continue;
+ if(!client_hasweapon(it, it.(weaponentity).m_weapon, weaponentity, true, false))
+ it.(weaponentity).m_switchweapon = w_getbestweapon(it, weaponentity);
+ }