void W_SwitchWeapon_Force(entity e, float w)
{
- // don't switch to another weapon if we're not allowed to
- if(e.weapon_forbidchange)
- return;
-
e.cnt = e.switchweapon;
e.switchweapon = w;
e.selectweapon = w;
void w_clear()
{
if (self.weapon != -1)
+ {
self.weapon = 0;
+ self.switchingweapon = 0;
+ }
if (self.weaponentity)
{
self.weaponentity.state = WS_CLEAR;
// the two weapon entities will notice this has changed and update their models
self.weapon = windex;
+ self.switchingweapon = windex; // to make sure
self.weaponname = e.mdl;
self.bulletcounter = 0;
};