X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fthrowing.qc;h=ae745efd6fdaa90f6ed39b9d8b59e4736a3c26fa;hb=b945d959784e5b249c66aea4f3326d8ae048f1cd;hp=52bf4a60788509039e72818a421099eb0c9aa907;hpb=c8f40d6c6d2fdef19f7c6bb9c988c02ab8a98e71;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/throwing.qc b/qcsrc/server/weapons/throwing.qc index 52bf4a607..ae745efd6 100644 --- a/qcsrc/server/weapons/throwing.qc +++ b/qcsrc/server/weapons/throwing.qc @@ -2,6 +2,7 @@ #include "weaponsystem.qh" #include "../resources.qh" +#include "../items.qh" #include "../mutators/_mod.qh" #include #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;