+void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
+{
+ if(me == own.crylink_lastgroup)
+ own.crylink_lastgroup = ((me == next) ? world : next);
+ prev.queuenext = next;
+ next.queueprev = prev;
+}
+
+void W_Crylink_Dequeue(entity e)
+{
+ W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
+}
+
+// force projectile to explode
+void W_Crylink_LinkExplode (entity e, entity e2)
+{
+ float a;
+ a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
+
+ if(e == e.realowner.crylink_lastgroup)
+ e.realowner.crylink_lastgroup = world;
+
+ RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
+
+ if(e.queuenext != e2)
+ W_Crylink_LinkExplode(e.queuenext, e2);
+
+ remove (e);
+}
+