#include "throwing.qh"
#include "weaponsystem.qh"
-#include "../mutators/mutators_include.qh"
+#include "../mutators/all.qh"
#include "../t_items.qh"
#include "../g_damage.qh"
#include "../../common/items/item.qh"
{SELFPARAM();
float thisammo, i;
string s;
- var .int ammotype = (get_weaponinfo(wpn)).ammo_field;
+ Weapon info = get_weaponinfo(wpn);
+ var .int ammotype = info.ammo_field;
- entity wep = spawn();
+ entity wep = new(droppedweapon);
setorigin(wep, org);
- wep.classname = "droppedweapon";
wep.velocity = velo;
wep.owner = wep.enemy = own;
wep.flags |= FL_TOSSED;
}
}
- WITH(entity, self, wep, weapon_defaultspawnfunc(wpn));
+ weapon_defaultspawnfunc(wep, info);
if(startitem_failed)
return string_null;
wep.glowmod = own.weaponentity_glowmod;
return;
if(!autocvar_g_weapon_throwable)
return;
- if(self.weaponentity.state != WS_READY)
+ int slot = 0; // TODO: unhardcode
+ if(self.weaponentity[slot].state != WS_READY)
return;
if(!W_IsWeaponThrowable(w))
return;