W_Crylink_Dequeue_Raw(e.crylink_owner, e.queueprev, e, e.queuenext);
}
+void W_Crylink_DeleteLink(entity this)
+{
+ if(this.classname != "spike_oktoremove")
+ W_Crylink_Dequeue(this);
+ delete_fn(this);
+}
+
void W_Crylink_Reset(entity this)
{
- W_Crylink_Dequeue(this);
delete(this);
}
else if(finalhit)
{
// just unlink
- W_Crylink_Dequeue(this);
delete(this);
return;
}
void W_Crylink_Fadethink(entity this)
{
- W_Crylink_Dequeue(this);
delete(this);
}
up = v_up;
shots = WEP_CVAR_PRI(crylink, shots);
- Send_Effect(EFFECT_CRYLINK_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, shots);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_CRYLINK_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
proj = prevproj = firstproj = NULL;
for(counter = 0; counter < shots; ++counter)
{
proj = new(spike);
+ proj.dtor = W_Crylink_DeleteLink;
proj.reset = W_Crylink_Reset;
proj.realowner = proj.owner = actor;
proj.crylink_owner = actor;
up = v_up;
shots = WEP_CVAR_SEC(crylink, shots);
- Send_Effect(EFFECT_CRYLINK_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, shots);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_CRYLINK_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
proj = prevproj = firstproj = NULL;
for(counter = 0; counter < shots; ++counter)
{
proj = new(spike);
+ proj.dtor = W_Crylink_DeleteLink;
proj.weaponentity_fld = weaponentity;
proj.reset = W_Crylink_Reset;
proj.realowner = proj.owner = actor;
}
actor.(weaponentity).crylink_waitrelease = 0;
if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity) && !thiswep.wr_checkammo2(thiswep, actor, weaponentity))
- if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(actor.items & IT_UNLIMITED_AMMO))
{
// ran out of ammo!
actor.cnt = thiswep.m_id;