X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_weapons.qc;h=7b0bbce3c8ff83ab2b4314ab087b252f5a10b30f;hp=5271da05706ba3adb64ece06a9c1ed98add1b9bd;hb=cc7f2857061649324097221e0946b42e130a03f7;hpb=194e2e23ed2569fd71f1f7cb5c33e833a46fcb2d diff --git a/qcsrc/server/cl_weapons.qc b/qcsrc/server/cl_weapons.qc index 5271da057..7b0bbce3c 100644 --- a/qcsrc/server/cl_weapons.qc +++ b/qcsrc/server/cl_weapons.qc @@ -221,6 +221,13 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto wep.ammofield = thisammo; own.ammofield -= thisammo; s = strcat(s, " and ", ftos(thisammo), " ", Item_CounterFieldName(j)); + + // if our weapon is loaded, give its load back to the player + if(self.weapon_load[self.weapon] > 0) + { + own.ammofield += self.weapon_load[self.weapon]; + self.weapon_load[self.weapon] = -1; // schedule the weapon for reloading + } } } s = substring(s, 5, -1);