]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/throwing.qc
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / throwing.qc
index 52bf4a60788509039e72818a421099eb0c9aa907..ae745efd6fdaa90f6ed39b9d8b59e4736a3c26fa 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "weaponsystem.qh"
 #include "../resources.qh"
+#include "../items.qh"
 #include "../mutators/_mod.qh"
 #include <common/t_items.qh>
 #include "../g_damage.qh"
@@ -40,8 +41,8 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
        Weapon info = Weapons_from(wpn);
        int ammotype = info.ammo_type;
 
-       entity wep = new(droppedweapon);
-
+       entity wep = spawn();
+       Item_SetLoot(wep, true);
        setorigin(wep, org);
        wep.velocity = velo;
        wep.owner = wep.enemy = own;
@@ -54,6 +55,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
 
        if(WepSet_FromWeapon(Weapons_from(wpn)) & WEPSET_SUPERWEAPONS)
        {
+               Item_SetExpiring(wep, true);
                if(own.items & IT_UNLIMITED_SUPERWEAPONS)
                {
                        wep.superweapons_finished = time + autocvar_g_balance_superweapons_time;