From: Mario Date: Mon, 18 Jun 2018 08:40:02 +0000 (+1000) Subject: Leave the load in the weapon when throwing it X-Git-Tag: xonotic-v0.8.5~2016 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b3b87165949a2d97634b425231aeb56324cc1ce7;p=xonotic%2Fxonotic-data.pk3dir.git Leave the load in the weapon when throwing it --- diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 462af14d8..35837af90 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -101,6 +101,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto if(doreduce && g_weapon_stay == 2) { + #if 0 // if our weapon is loaded, give its load back to the player int i = own.(weaponentity).m_weapon.m_id; if(own.(weaponentity).(weapon_load[i]) > 0) @@ -108,10 +109,12 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto GiveResource(own, ammotype, own.(weaponentity).(weapon_load[i])); own.(weaponentity).(weapon_load[i]) = -1; // schedule the weapon for reloading } + #endif SetResourceAmount(wep, ammotype, 0); } else if(doreduce) { + #if 0 // if our weapon is loaded, give its load back to the player int i = own.(weaponentity).m_weapon.m_id; if(own.(weaponentity).(weapon_load[i]) > 0) @@ -119,7 +122,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto GiveResource(own, ammotype, own.(weaponentity).(weapon_load[i])); own.(weaponentity).(weapon_load[i]) = -1; // schedule the weapon for reloading } - + #endif float ownderammo = GetResourceAmount(own, ammotype); thisammo = min(ownderammo, GetResourceAmount(wep, ammotype)); SetResourceAmount(wep, ammotype, thisammo);