void W_SwitchWeapon_Force(Player this, Weapon wep, .entity weaponentity)
{
TC(Weapon, wep);
- this.(weaponentity).cnt = this.(weaponentity).m_switchweapon.m_id;
- this.(weaponentity).m_switchweapon = wep;
- this.(weaponentity).selectweapon = wep.m_id;
+ entity w_ent = this.(weaponentity);
+ w_ent.cnt = w_ent.m_switchweapon.m_id;
+ w_ent.m_switchweapon = wep;
+ w_ent.selectweapon = wep.m_id;
}
// perform weapon to attack (weaponstate and attack_finished check is here)