]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Leave the load in the weapon when throwing it"
authorMario <mario@smbclan.net>
Mon, 18 Jun 2018 08:42:03 +0000 (18:42 +1000)
committerMario <mario@smbclan.net>
Mon, 18 Jun 2018 08:42:03 +0000 (18:42 +1000)
This reverts commit b3b87165949a2d97634b425231aeb56324cc1ce7.

qcsrc/server/weapons/throwing.qc

index 35837af90f567e394c2c610f5e20d465a5830fec..462af14d8e0ca151f366f9daa611f1caf3c00cc7 100644 (file)
@@ -101,7 +101,6 @@ 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)
@@ -109,12 +108,10 @@ 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)
@@ -122,7 +119,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);