From: Mircea Kitsune Date: Fri, 11 Feb 2011 20:42:15 +0000 (+0200) Subject: No need to use floats when calling W_ReloadCheck, as we have the current globals... X-Git-Tag: xonotic-v0.5.0~309^2~7^2~38 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dfb6d25e2fea778a469362789ce1eb04c66be887;p=xonotic%2Fxonotic-data.pk3dir.git No need to use floats when calling W_ReloadCheck, as we have the current globals to use directly. --- diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 68873fa1a..db2202e89 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1633,7 +1633,7 @@ void W_DecreaseAmmo(.float ammo_type, float ammo_use, float ammo_reload) .float reload_complain; .string reload_sound; -float W_ReloadCheck(float ammo_amount, float ammo_shot) +float W_ReloadCheck() { // check if we meet the necessary conditions to reload @@ -1656,7 +1656,7 @@ float W_ReloadCheck(float ammo_amount, float ammo_shot) return FALSE; // no ammo, so nothing to load - if(!ammo_amount && ammo_shot) + if(!self.(self.current_ammo) && self.reload_ammo_min) { if(clienttype(self) == CLIENTTYPE_REAL && self.reload_complain < time) { @@ -1738,7 +1738,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri self.reload_time = sent_time; self.reload_sound = sent_sound; - if(!W_ReloadCheck(self.(self.current_ammo), self.reload_ammo_min)) + if(!W_ReloadCheck()) return; // now we can begin the actual reloading