3 /* WEP_##id */ CRYLINK,
4 /* function */ W_Crylink,
5 /* ammotype */ ammo_cells,
7 /* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
8 /* rating */ BOT_PICKUP_RATING_MID,
10 /* modelname */ "crylink",
11 /* simplemdl */ "foobar",
12 /* crosshair */ "gfx/crosshaircrylink 0.5",
13 /* wepimg */ "weaponcrylink",
14 /* refname */ "crylink",
15 /* wepname */ _("Crylink")
18 #define CRYLINK_SETTINGS(w_cvar,w_prop) CRYLINK_SETTINGS_LIST(w_cvar, w_prop, CRYLINK, crylink)
19 #define CRYLINK_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
20 w_cvar(id, sn, BOTH, ammo) \
21 w_cvar(id, sn, BOTH, animtime) \
22 w_cvar(id, sn, BOTH, damage) \
23 w_cvar(id, sn, BOTH, edgedamage) \
24 w_cvar(id, sn, BOTH, radius) \
25 w_cvar(id, sn, BOTH, force) \
26 w_cvar(id, sn, BOTH, spread) \
27 w_cvar(id, sn, BOTH, refire) \
28 w_cvar(id, sn, BOTH, speed) \
29 w_cvar(id, sn, BOTH, shots) \
30 w_cvar(id, sn, BOTH, bounces) \
31 w_cvar(id, sn, BOTH, bouncedamagefactor) \
32 w_cvar(id, sn, BOTH, middle_lifetime) \
33 w_cvar(id, sn, BOTH, middle_fadetime) \
34 w_cvar(id, sn, BOTH, other_lifetime) \
35 w_cvar(id, sn, BOTH, other_fadetime) \
36 w_cvar(id, sn, BOTH, linkexplode) \
37 w_cvar(id, sn, BOTH, joindelay) \
38 w_cvar(id, sn, BOTH, joinspread) \
39 w_cvar(id, sn, BOTH, joinexplode) \
40 w_cvar(id, sn, BOTH, joinexplode_damage) \
41 w_cvar(id, sn, BOTH, joinexplode_edgedamage) \
42 w_cvar(id, sn, BOTH, joinexplode_radius) \
43 w_cvar(id, sn, BOTH, joinexplode_force) \
44 w_cvar(id, sn, SEC, spreadtype) \
45 w_cvar(id, sn, NONE, secondary) \
46 w_prop(id, sn, float, reloading_ammo, reload_ammo) \
47 w_prop(id, sn, float, reloading_time, reload_time) \
48 w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \
49 w_prop(id, sn, float, switchdelay_drop, switchdelay_drop) \
50 w_prop(id, sn, string, weaponreplace, weaponreplace) \
51 w_prop(id, sn, float, weaponstart, weaponstart) \
52 w_prop(id, sn, float, weaponstartoverride, weaponstartoverride) \
53 w_prop(id, sn, float, weaponthrowable, weaponthrowable)
56 CRYLINK_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
58 .float crylink_waitrelease;
59 .entity crylink_lastgroup;
67 void spawnfunc_weapon_crylink(void) { weapon_defaultspawnfunc(WEP_CRYLINK.m_id); }
69 void W_Crylink_CheckLinks(entity e)
75 error("W_Crylink_CheckLinks: entity is world");
76 if(e.classname != "spike" || wasfreed(e))
77 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
80 for(i = 0; i < 1000; ++i)
82 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
83 error("W_Crylink_CheckLinks: queue is inconsistent");
89 error("W_Crylink_CheckLinks: infinite chain");
92 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
94 W_Crylink_CheckLinks(next);
95 if(me == own.crylink_lastgroup)
96 own.crylink_lastgroup = ((me == next) ? world : next);
97 prev.queuenext = next;
98 next.queueprev = prev;
99 me.classname = "spike_oktoremove";
101 W_Crylink_CheckLinks(next);
104 void W_Crylink_Dequeue(entity e)
106 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
109 void W_Crylink_Reset(void)
111 W_Crylink_Dequeue(self);
115 // force projectile to explode
116 void W_Crylink_LinkExplode(entity e, entity e2)
123 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
125 if(e == e.realowner.crylink_lastgroup)
126 e.realowner.crylink_lastgroup = world;
128 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
130 RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * a, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * a, WEP_CVAR_BOTH(crylink, isprimary, radius), world, world, WEP_CVAR_BOTH(crylink, isprimary, force) * a, e.projectiledeathtype, other);
132 W_Crylink_LinkExplode(e.queuenext, e2);
134 e.classname = "spike_oktoremove";
138 // adjust towards center
139 // returns the origin where they will meet... and the time till the meeting is
140 // stored in w_crylink_linkjoin_time.
141 // could possibly network this origin and time, and display a special particle
142 // effect when projectiles meet there :P
143 // jspeed: joining speed (calculate this as join spread * initial speed)
144 float w_crylink_linkjoin_time;
145 vector W_Crylink_LinkJoin(entity e, float jspeed)
147 vector avg_origin, avg_velocity;
152 // FIXME remove this debug code
153 W_Crylink_CheckLinks(e);
155 w_crylink_linkjoin_time = 0;
157 avg_origin = e.origin;
158 avg_velocity = e.velocity;
160 for(p = e; (p = p.queuenext) != e; )
162 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
163 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
166 avg_origin *= (1.0 / n);
167 avg_velocity *= (1.0 / n);
170 return avg_origin; // nothing to do
172 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
173 avg_dist = pow(vlen(e.origin - avg_origin), 2);
174 for(p = e; (p = p.queuenext) != e; )
175 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
176 avg_dist *= (1.0 / n);
177 avg_dist = sqrt(avg_dist);
180 return avg_origin; // no change needed
184 e.velocity = avg_velocity;
185 UpdateCSQCProjectile(e);
186 for(p = e; (p = p.queuenext) != e; )
188 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
189 UpdateCSQCProjectile(p);
191 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
195 w_crylink_linkjoin_time = avg_dist / jspeed;
196 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
198 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
199 UpdateCSQCProjectile(e);
200 for(p = e; (p = p.queuenext) != e; )
202 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
203 UpdateCSQCProjectile(p);
207 // jspeed -> +infinity:
208 // w_crylink_linkjoin_time -> +0
209 // targ_origin -> avg_origin
210 // p->velocity -> HUEG towards center
212 // w_crylink_linkjoin_time -> +/- infinity
213 // targ_origin -> avg_velocity * +/- infinity
214 // p->velocity -> avg_velocity
215 // jspeed -> -infinity:
216 // w_crylink_linkjoin_time -> -0
217 // targ_origin -> avg_origin
218 // p->velocity -> HUEG away from center
221 W_Crylink_CheckLinks(e);
226 void W_Crylink_LinkJoinEffect_Think(void)
228 // is there at least 2 projectiles very close?
231 e = self.owner.crylink_lastgroup;
235 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
237 for(p = e; (p = p.queuenext) != e; )
239 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
244 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
246 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
248 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
252 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
253 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
254 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n,
257 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n,
258 e.projectiledeathtype,
261 Send_Effect("crylink_joinexplode", self.origin, '0 0 0', n);
268 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
270 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, false);
271 float hit_friendly = 0;
276 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
278 if(SAME_TEAM(head, projectile.realowner))
287 return (hit_enemy ? false : hit_friendly);
290 // NO bounce protection, as bounces are limited!
291 void W_Crylink_Touch(void)
295 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
299 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
301 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
305 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
309 float totaldamage = RadiusDamage(self, self.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * f, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * f, WEP_CVAR_BOTH(crylink, isprimary, radius), world, world, WEP_CVAR_BOTH(crylink, isprimary, force) * f, self.projectiledeathtype, other);
311 if(totaldamage && ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 2) || ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 1) && !W_Crylink_Touch_WouldHitFriendly(self, WEP_CVAR_BOTH(crylink, isprimary, radius)))))
313 if(self == self.realowner.crylink_lastgroup)
314 self.realowner.crylink_lastgroup = world;
315 W_Crylink_LinkExplode(self.queuenext, self);
316 self.classname = "spike_oktoremove";
323 W_Crylink_Dequeue(self);
327 self.cnt = self.cnt - 1;
328 self.angles = vectoangles(self.velocity);
330 self.projectiledeathtype |= HITTYPE_BOUNCE;
331 // commented out as it causes a little hitch...
333 // CSQCProjectile(proj, true, PROJECTILE_CRYLINK, true);
336 void W_Crylink_Fadethink(void)
338 W_Crylink_Dequeue(self);
342 void W_Crylink_Attack(void)
344 float counter, shots;
345 entity proj, prevproj, firstproj;
347 vector forward, right, up;
350 W_DecreaseAmmo(WEP_CVAR_PRI(crylink, ammo));
352 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
353 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
354 if(WEP_CVAR_PRI(crylink, joinexplode))
355 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
357 W_SetupShot(self, false, 2, W_Sound("crylink_fire"), CH_WEAPON_A, maxdmg);
362 shots = WEP_CVAR_PRI(crylink, shots);
363 Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
364 proj = prevproj = firstproj = world;
365 for(counter = 0; counter < shots; ++counter)
368 proj.reset = W_Crylink_Reset;
369 proj.realowner = proj.owner = self;
370 proj.classname = "spike";
371 proj.bot_dodge = true;
372 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
374 proj.queuenext = proj;
375 proj.queueprev = proj;
377 else if(counter == 0) { // first projectile, store in firstproj for now
380 else if(counter == shots - 1) { // last projectile, link up with first projectile
381 prevproj.queuenext = proj;
382 firstproj.queueprev = proj;
383 proj.queuenext = firstproj;
384 proj.queueprev = prevproj;
386 else { // else link up with previous projectile
387 prevproj.queuenext = proj;
388 proj.queueprev = prevproj;
393 proj.movetype = MOVETYPE_BOUNCEMISSILE;
394 PROJECTILE_MAKETRIGGER(proj);
395 proj.projectiledeathtype = WEP_CRYLINK.m_id;
396 //proj.gravity = 0.001;
398 setorigin(proj, w_shotorg);
399 setsize(proj, '0 0 0', '0 0 0');
407 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
411 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
412 W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, false);
413 proj.touch = W_Crylink_Touch;
415 proj.think = W_Crylink_Fadethink;
418 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
419 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
420 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
424 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
425 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
426 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
428 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
429 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
430 //proj.scale = 1 + 1 * proj.cnt;
432 proj.angles = vectoangles(proj.velocity);
434 //proj.glow_size = 20;
436 proj.flags = FL_PROJECTILE;
437 proj.missile_flags = MIF_SPLASH;
439 CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true);
441 MUTATOR_CALLHOOK(EditProjectile, self, proj);
443 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
445 self.crylink_lastgroup = proj;
446 W_Crylink_CheckLinks(proj);
447 self.crylink_waitrelease = 1;
451 void W_Crylink_Attack2(void)
453 float counter, shots;
454 entity proj, prevproj, firstproj;
456 vector forward, right, up;
459 W_DecreaseAmmo(WEP_CVAR_SEC(crylink, ammo));
461 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
462 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
463 if(WEP_CVAR_SEC(crylink, joinexplode))
464 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
466 W_SetupShot(self, false, 2, W_Sound("crylink_fire2"), CH_WEAPON_A, maxdmg);
471 shots = WEP_CVAR_SEC(crylink, shots);
472 Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
473 proj = prevproj = firstproj = world;
474 for(counter = 0; counter < shots; ++counter)
477 proj.reset = W_Crylink_Reset;
478 proj.realowner = proj.owner = self;
479 proj.classname = "spike";
480 proj.bot_dodge = true;
481 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
483 proj.queuenext = proj;
484 proj.queueprev = proj;
486 else if(counter == 0) { // first projectile, store in firstproj for now
489 else if(counter == shots - 1) { // last projectile, link up with first projectile
490 prevproj.queuenext = proj;
491 firstproj.queueprev = proj;
492 proj.queuenext = firstproj;
493 proj.queueprev = prevproj;
495 else { // else link up with previous projectile
496 prevproj.queuenext = proj;
497 proj.queueprev = prevproj;
502 proj.movetype = MOVETYPE_BOUNCEMISSILE;
503 PROJECTILE_MAKETRIGGER(proj);
504 proj.projectiledeathtype = WEP_CRYLINK.m_id | HITTYPE_SECONDARY;
505 //proj.gravity = 0.001;
507 setorigin(proj, w_shotorg);
508 setsize(proj, '0 0 0', '0 0 0');
510 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
517 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
521 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
522 s = w_shotdir + right * s.y + up * s.z;
526 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
529 W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, false);
530 proj.touch = W_Crylink_Touch;
531 proj.think = W_Crylink_Fadethink;
532 if(counter == (shots - 1) / 2)
534 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
535 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
536 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
540 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
541 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
542 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
544 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
545 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
546 //proj.scale = 1 + 1 * proj.cnt;
548 proj.angles = vectoangles(proj.velocity);
550 //proj.glow_size = 20;
552 proj.flags = FL_PROJECTILE;
553 proj.missile_flags = MIF_SPLASH;
555 CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true);
557 MUTATOR_CALLHOOK(EditProjectile, self, proj);
559 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
561 self.crylink_lastgroup = proj;
562 W_Crylink_CheckLinks(proj);
563 self.crylink_waitrelease = 2;
567 bool W_Crylink(int req)
575 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), false);
577 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false);
583 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) // forced reload
584 WEP_ACTION(self.weapon, WR_RELOAD);
588 if(self.crylink_waitrelease != 1)
589 if(weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
592 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
596 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
598 if(self.crylink_waitrelease != 2)
599 if(weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
602 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
606 if((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
608 if(!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
610 // fired and released now!
611 if(self.crylink_lastgroup)
614 entity linkjoineffect;
615 float isprimary = (self.crylink_waitrelease == 1);
617 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
619 linkjoineffect = spawn();
620 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
621 linkjoineffect.classname = "linkjoineffect";
622 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
623 linkjoineffect.owner = self;
624 setorigin(linkjoineffect, pos);
626 self.crylink_waitrelease = 0;
627 if(!W_Crylink(WR_CHECKAMMO1) && !W_Crylink(WR_CHECKAMMO2))
628 if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
631 self.cnt = WEP_CRYLINK.m_id;
632 self.switchweapon = w_getbestweapon(self);
641 precache_model(W_Model("g_crylink.md3"));
642 precache_model(W_Model("v_crylink.md3"));
643 precache_model(W_Model("h_crylink.iqm"));
644 precache_sound(W_Sound("crylink_fire"));
645 precache_sound(W_Sound("crylink_fire2"));
646 precache_sound(W_Sound("crylink_linkjoin"));
647 CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
652 // don't "run out of ammo" and switch weapons while waiting for release
653 if(self.crylink_lastgroup && self.crylink_waitrelease)
656 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
657 ammo_amount += self.(weapon_load[WEP_CRYLINK.m_id]) >= WEP_CVAR_PRI(crylink, ammo);
662 // don't "run out of ammo" and switch weapons while waiting for release
663 if(self.crylink_lastgroup && self.crylink_waitrelease)
666 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
667 ammo_amount += self.(weapon_load[WEP_CRYLINK.m_id]) >= WEP_CVAR_SEC(crylink, ammo);
672 CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
677 W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), W_Sound("reload"));
680 case WR_SUICIDEMESSAGE:
682 return WEAPON_CRYLINK_SUICIDE;
686 return WEAPON_CRYLINK_MURDER;
693 bool W_Crylink(int req)
697 case WR_IMPACTEFFECT:
700 org2 = w_org + w_backoff * 2;
701 if(w_deathtype & HITTYPE_SECONDARY)
703 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
705 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
709 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
711 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
718 precache_sound("weapons/crylink_impact2.wav");
719 precache_sound("weapons/crylink_impact.wav");
724 // no weapon specific image for this weapon