X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_weaponsystem.qc;h=0b73f36144994867b931c422980d4b348e28348f;hb=db3d8b68f0aff3f1304428e9d60836b4a8013a5a;hp=8cf41bd2608d33e8b238b22ee6fe0ecd3a7fb1e7;hpb=d18d82068eeb84edfe1703360fcda800cae4d0bb;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 8cf41bd26..0b73f3614 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -34,10 +34,6 @@ float W_WeaponRateFactor() 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; @@ -255,7 +251,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m (time > ent.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold) ) // prevent insane sound spam { - sound(ent, CH_ITEMS, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM); + sound(ent, CH_TRIGGER, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM); ent.prevstrengthsound = time; } ent.prevstrengthsoundattempt = time; @@ -1007,7 +1003,10 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) void w_clear() { if (self.weapon != -1) + { self.weapon = 0; + self.switchingweapon = 0; + } if (self.weaponentity) { self.weaponentity.state = WS_CLEAR; @@ -1033,6 +1032,7 @@ void weapon_setup(float windex) // 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; };