]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_weaponsystem.qc
Merge branch 'master' into Mario/overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_weaponsystem.qc
index f3d675f35e71a3000ef814d410c43930cb959b59..94944fc3c52711183bb61d9af054d44466b36bec 100644 (file)
@@ -1279,7 +1279,14 @@ void W_SetupProjectileVelocity(entity missile, float pSpeed, float spread)
 #define W_SETUPPROJECTILEVELOCITY(m,s) W_SetupProjectileVelocityEx(m, w_shotdir, v_up, cvar(#s "_speed"), 0, 0, cvar(#s "_spread"), FALSE)
 
 void W_DecreaseAmmo(.float ammo_type, float ammo_use, float ammo_reload)
-{
+{      
+       if(cvar("g_overkill"))
+       if(autocvar_g_overkill_ammo_charge)
+       {
+               ok_DecreaseCharge(self, self.weapon);
+               return; // TODO
+       }
+               
        if((self.items & IT_UNLIMITED_WEAPON_AMMO) && !ammo_reload)
                return;
 
@@ -1340,6 +1347,10 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
 
        entity e;
        e = get_weaponinfo(self.weapon);
+       
+       if(cvar("g_overkill"))
+       if(autocvar_g_overkill_ammo_charge)
+               return; // TODO
 
        // don't reload weapons that don't have the RELOADABLE flag
        if (!(e.spawnflags & WEP_FLAG_RELOADABLE))