X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fselection.qc;h=ca331bb3c49af73091d4b0020f535d95e2bdc68b;hp=09f5e65ca14349aa7da3fc37f7d5b68638779647;hb=c46d740e11e20eea0df3bbad11f4404324f26fe1;hpb=3312f18afae86a2c3789a835de564648ffb6aa7d diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 09f5e65ca..ca331bb3c 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -243,9 +243,10 @@ float W_GetCycleWeapon(entity this, string weaponorder, float dir, float imp, fl 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)