#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
- #include "../../dpdefs/progsdefs.qc"
- #include "../../dpdefs/dpextensions.qc"
+ #include "../../dpdefs/progsdefs.qh"
+ #include "../../dpdefs/dpextensions.qh"
#include "../../common/util.qh"
#include "../../common/weapons/weapons.qh"
#include "throwing.qh"
entity oldself, wep;
float thisammo, i;
string s;
- var .float ammotype = (get_weaponinfo(wpn)).ammo_field;
+ var .int ammotype = (get_weaponinfo(wpn)).ammo_field;
wep = spawn();
wep.owner = wep.enemy = own;
wep.flags |= FL_TOSSED;
wep.colormap = own.colormap;
-
+
W_DropEvent(WR_DROP,own,wpn,wep);
if(WepSet_FromWeapon(wpn) & WEPSET_SUPERWEAPONS)
wep.savenextthink = wep.nextthink;
wep.nextthink = min(wep.nextthink, time + 0.5);
wep.pickup_anyway = true; // these are ALWAYS pickable
-
+
//wa = W_AmmoItemCode(wpn);
if(ammotype == ammo_none)
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
-
+
if(!a) return;
Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
}