if (this)
{
- FOREACH_CLIENT(true, LAMBDA(
+ FOREACH_CLIENT(true, {
if(it == actor || (IS_SPEC(it) && it.enemy == actor))
wframe_send(it, this, a, restartanim);
- ));
+ });
}
if ((fr == WFRAME_FIRE1 || fr == WFRAME_FIRE2) && t)
}
}
- if (this.m_switchweapon == WEP_Null)
- {
- this.m_weapon = WEP_Null;
- this.m_switchingweapon = WEP_Null;
- this.state = WS_CLEAR;
- this.weaponname = "";
- return;
- }
-
if(autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0)
{
.entity wepe1 = weaponentities[0];
entity wep1 = actor.(wepe1);
this.m_switchweapon = wep1.m_switchweapon;
- if(!(this.m_switchweapon.spawnflags & WEP_FLAG_DUALWIELD))
+ entity store = IS_PLAYER(actor) ? PS(actor) : actor;
+ if(!(this.m_switchweapon.spawnflags & WEP_FLAG_DUALWIELD) && !(store.dual_weapons & wep1.m_switchweapon.m_wepset))
{
this.m_weapon = WEP_Null;
this.m_switchingweapon = WEP_Null;
}
}
+ if (this.m_switchweapon == WEP_Null)
+ {
+ this.m_weapon = WEP_Null;
+ this.m_switchingweapon = WEP_Null;
+ this.state = WS_CLEAR;
+ this.weaponname = "";
+ return;
+ }
+
makevectors(actor.v_angle);
vector fo = v_forward; // save them in case the weapon think functions change it
vector ri = v_right;
this.clip_load = this.clip_size = 0;
}
- weapon_thinkf(actor, weaponentity, WFRAME_IDLE, newwep.switchdelay_raise, w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_DONTCHANGE, newwep.switchdelay_raise, w_ready);
break;
}
case WS_DROP: