- player.weapons = player.(weaponentity).weapons;
- Weapon w = WEP_NEXBALL;
- w.wr_resetplayer(w, player);
- PS(player).m_switchweapon = player.(weaponentity).m_switchweapon;
- W_SwitchWeapon(player, PS(player).m_switchweapon);
+ .entity weaponentity = weaponentities[slot];
+
+ if(player.(weaponentity).weapons)
+ {
+ player.weapons = player.(weaponentity).weapons;
+ Weapon w = WEP_NEXBALL;
+ w.wr_resetplayer(w, player);
+ player.(weaponentity).m_switchweapon = player.m_switchweapon;
+ W_SwitchWeapon(player, player.(weaponentity).m_switchweapon, weaponentity);