X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_weaponsystem.qc;h=b3b0e6ea06f6d81123acf8ebb0ce60d06412f4e0;hb=60ed95fe707decf91bb54393d4c11ee4faa2e418;hp=9aae26e6afb2c7aa10d4fc0449901bde797cce64;hpb=1e926ffdd1dc18bdde7a189a54938ac205d39260;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 9aae26e6a..b3b0e6ea0 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1297,6 +1297,12 @@ void weapon_thinkf(float fr, float t, void() func) anim_z = anim_y / (t + sys_frametime); setanim(self, anim, FALSE, TRUE, TRUE); } + else if (self.animstate_startframe == self.anim_idle_x) // only allow shoot anim to override idle animation until we have animation blending + { + anim = self.anim_shoot; + anim_z = anim_y / (t + sys_frametime); + setanim(self, anim, FALSE, TRUE, TRUE); + } } }; @@ -1657,7 +1663,7 @@ void W_DecreaseAmmo(.float ammo_type, float ammo_use, float ammo_reload) if(ammo_reload) { self.clip_load -= ammo_use; - self.weapon_load[self.weapon] = self.clip_load; + self.(weapon_load[self.weapon]) = self.clip_load; } else self.(self.current_ammo) -= ammo_use; @@ -1686,7 +1692,7 @@ void W_ReloadedAndReady() self.(self.current_ammo) -= 1; } } - self.weapon_load[self.weapon] = self.clip_load; + self.(weapon_load[self.weapon]) = self.clip_load; // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon, // then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there, @@ -1769,5 +1775,5 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri if(self.clip_load < 0) self.clip_load = 0; self.old_clip_load = self.clip_load; - self.clip_load = self.weapon_load[self.weapon] = -1; + self.clip_load = self.(weapon_load[self.weapon]) = -1; }