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 /* model */ "crylink",
11 /* crosshair */ "gfx/crosshaircrylink",
12 /* netname */ "crylink",
13 /* fullname */ _("Crylink")
16 #define CRYLINK_SETTINGS(w_cvar,w_prop) CRYLINK_SETTINGS_LIST(w_cvar, w_prop, CRYLINK, crylink)
17 #define CRYLINK_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
18 w_cvar(id, sn, BOTH, ammo) \
19 w_cvar(id, sn, BOTH, animtime) \
20 w_cvar(id, sn, BOTH, damage) \
21 w_cvar(id, sn, BOTH, edgedamage) \
22 w_cvar(id, sn, BOTH, radius) \
23 w_cvar(id, sn, BOTH, force) \
24 w_cvar(id, sn, BOTH, spread) \
25 w_cvar(id, sn, BOTH, refire) \
26 w_cvar(id, sn, BOTH, speed) \
27 w_cvar(id, sn, BOTH, shots) \
28 w_cvar(id, sn, BOTH, bounces) \
29 w_cvar(id, sn, BOTH, bouncedamagefactor) \
30 w_cvar(id, sn, BOTH, middle_lifetime) \
31 w_cvar(id, sn, BOTH, middle_fadetime) \
32 w_cvar(id, sn, BOTH, other_lifetime) \
33 w_cvar(id, sn, BOTH, other_fadetime) \
34 w_cvar(id, sn, BOTH, linkexplode) \
35 w_cvar(id, sn, BOTH, joindelay) \
36 w_cvar(id, sn, BOTH, joinspread) \
37 w_cvar(id, sn, BOTH, joinexplode) \
38 w_cvar(id, sn, BOTH, joinexplode_damage) \
39 w_cvar(id, sn, BOTH, joinexplode_edgedamage) \
40 w_cvar(id, sn, BOTH, joinexplode_radius) \
41 w_cvar(id, sn, BOTH, joinexplode_force) \
42 w_cvar(id, sn, SEC, spreadtype) \
43 w_cvar(id, sn, NONE, secondary) \
44 w_prop(id, sn, float, reloading_ammo, reload_ammo) \
45 w_prop(id, sn, float, reloading_time, reload_time) \
46 w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \
47 w_prop(id, sn, float, switchdelay_drop, switchdelay_drop) \
48 w_prop(id, sn, string, weaponreplace, weaponreplace) \
49 w_prop(id, sn, float, weaponstart, weaponstart) \
50 w_prop(id, sn, float, weaponstartoverride, weaponstartoverride)
53 CRYLINK_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
55 .float crylink_waitrelease;
56 .entity crylink_lastgroup;
63 void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
65 void W_Crylink_CheckLinks(entity e)
71 error("W_Crylink_CheckLinks: entity is world");
72 if(e.classname != "spike" || wasfreed(e))
73 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
76 for(i = 0; i < 1000; ++i)
78 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
79 error("W_Crylink_CheckLinks: queue is inconsistent");
85 error("W_Crylink_CheckLinks: infinite chain");
88 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
90 W_Crylink_CheckLinks(next);
91 if(me == own.crylink_lastgroup)
92 own.crylink_lastgroup = ((me == next) ? world : next);
93 prev.queuenext = next;
94 next.queueprev = prev;
95 me.classname = "spike_oktoremove";
97 W_Crylink_CheckLinks(next);
100 void W_Crylink_Dequeue(entity e)
102 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
105 void W_Crylink_Reset(void)
107 W_Crylink_Dequeue(self);
111 // force projectile to explode
112 void W_Crylink_LinkExplode (entity e, entity e2)
119 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
121 if(e == e.realowner.crylink_lastgroup)
122 e.realowner.crylink_lastgroup = world;
124 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
126 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);
128 W_Crylink_LinkExplode(e.queuenext, e2);
130 e.classname = "spike_oktoremove";
134 // adjust towards center
135 // returns the origin where they will meet... and the time till the meeting is
136 // stored in w_crylink_linkjoin_time.
137 // could possibly network this origin and time, and display a special particle
138 // effect when projectiles meet there :P
139 // jspeed: joining speed (calculate this as join spread * initial speed)
140 float w_crylink_linkjoin_time;
141 vector W_Crylink_LinkJoin(entity e, float jspeed)
143 vector avg_origin, avg_velocity;
148 // FIXME remove this debug code
149 W_Crylink_CheckLinks(e);
151 w_crylink_linkjoin_time = 0;
153 avg_origin = e.origin;
154 avg_velocity = e.velocity;
156 for(p = e; (p = p.queuenext) != e; )
158 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
159 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
162 avg_origin *= (1.0 / n);
163 avg_velocity *= (1.0 / n);
166 return avg_origin; // nothing to do
168 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
169 avg_dist = pow(vlen(e.origin - avg_origin), 2);
170 for(p = e; (p = p.queuenext) != e; )
171 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
172 avg_dist *= (1.0 / n);
173 avg_dist = sqrt(avg_dist);
176 return avg_origin; // no change needed
180 e.velocity = avg_velocity;
181 UpdateCSQCProjectile(e);
182 for(p = e; (p = p.queuenext) != e; )
184 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
185 UpdateCSQCProjectile(p);
187 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
191 w_crylink_linkjoin_time = avg_dist / jspeed;
192 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
194 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
195 UpdateCSQCProjectile(e);
196 for(p = e; (p = p.queuenext) != e; )
198 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
199 UpdateCSQCProjectile(p);
203 // jspeed -> +infinity:
204 // w_crylink_linkjoin_time -> +0
205 // targ_origin -> avg_origin
206 // p->velocity -> HUEG towards center
208 // w_crylink_linkjoin_time -> +/- infinity
209 // targ_origin -> avg_velocity * +/- infinity
210 // p->velocity -> avg_velocity
211 // jspeed -> -infinity:
212 // w_crylink_linkjoin_time -> -0
213 // targ_origin -> avg_origin
214 // p->velocity -> HUEG away from center
217 W_Crylink_CheckLinks(e);
222 void W_Crylink_LinkJoinEffect_Think()
224 // is there at least 2 projectiles very close?
227 e = self.owner.crylink_lastgroup;
231 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
233 for(p = e; (p = p.queuenext) != e; )
235 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
240 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
242 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
244 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
248 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
249 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
250 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n,
253 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n,
254 e.projectiledeathtype,
257 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
264 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
266 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE);
267 float hit_friendly = 0;
272 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
274 if(SAME_TEAM(head, projectile.realowner))
283 return (hit_enemy ? FALSE : hit_friendly);
286 // NO bounce protection, as bounces are limited!
287 void W_Crylink_Touch (void)
291 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
295 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
297 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
301 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
305 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);
307 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)))))
309 if(self == self.realowner.crylink_lastgroup)
310 self.realowner.crylink_lastgroup = world;
311 W_Crylink_LinkExplode(self.queuenext, self);
312 self.classname = "spike_oktoremove";
319 W_Crylink_Dequeue(self);
323 self.cnt = self.cnt - 1;
324 self.angles = vectoangles(self.velocity);
326 self.projectiledeathtype |= HITTYPE_BOUNCE;
327 // commented out as it causes a little hitch...
329 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
332 void W_Crylink_Fadethink (void)
334 W_Crylink_Dequeue(self);
338 void W_Crylink_Attack (void)
340 float counter, shots;
341 entity proj, prevproj, firstproj;
343 vector forward, right, up;
346 W_DecreaseAmmo(WEP_CVAR_PRI(crylink, ammo));
348 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
349 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
350 if(WEP_CVAR_PRI(crylink, joinexplode))
351 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
353 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg);
358 shots = WEP_CVAR_PRI(crylink, shots);
359 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
360 proj = prevproj = firstproj = world;
361 for(counter = 0; counter < shots; ++counter)
364 proj.reset = W_Crylink_Reset;
365 proj.realowner = proj.owner = self;
366 proj.classname = "spike";
367 proj.bot_dodge = TRUE;
368 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
370 proj.queuenext = proj;
371 proj.queueprev = proj;
373 else if(counter == 0) { // first projectile, store in firstproj for now
376 else if(counter == shots - 1) { // last projectile, link up with first projectile
377 prevproj.queuenext = proj;
378 firstproj.queueprev = proj;
379 proj.queuenext = firstproj;
380 proj.queueprev = prevproj;
382 else { // else link up with previous projectile
383 prevproj.queuenext = proj;
384 proj.queueprev = prevproj;
389 proj.movetype = MOVETYPE_BOUNCEMISSILE;
390 PROJECTILE_MAKETRIGGER(proj);
391 proj.projectiledeathtype = WEP_CRYLINK;
392 //proj.gravity = 0.001;
394 setorigin (proj, w_shotorg);
395 setsize(proj, '0 0 0', '0 0 0');
403 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
407 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
408 W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s_y + up * s_z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE);
409 proj.touch = W_Crylink_Touch;
411 proj.think = W_Crylink_Fadethink;
414 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
415 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
416 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
420 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
421 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
422 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
424 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
425 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
426 //proj.scale = 1 + 1 * proj.cnt;
428 proj.angles = vectoangles (proj.velocity);
430 //proj.glow_size = 20;
432 proj.flags = FL_PROJECTILE;
433 proj.missile_flags = MIF_SPLASH;
435 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
437 other = proj; MUTATOR_CALLHOOK(EditProjectile);
439 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
441 self.crylink_lastgroup = proj;
442 W_Crylink_CheckLinks(proj);
443 self.crylink_waitrelease = 1;
447 void W_Crylink_Attack2 (void)
449 float counter, shots;
450 entity proj, prevproj, firstproj;
452 vector forward, right, up;
455 W_DecreaseAmmo(WEP_CVAR_SEC(crylink, ammo));
457 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
458 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
459 if(WEP_CVAR_SEC(crylink, joinexplode))
460 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
462 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg);
467 shots = WEP_CVAR_SEC(crylink, shots);
468 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
469 proj = prevproj = firstproj = world;
470 for(counter = 0; counter < shots; ++counter)
473 proj.reset = W_Crylink_Reset;
474 proj.realowner = proj.owner = self;
475 proj.classname = "spike";
476 proj.bot_dodge = TRUE;
477 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
479 proj.queuenext = proj;
480 proj.queueprev = proj;
482 else if(counter == 0) { // first projectile, store in firstproj for now
485 else if(counter == shots - 1) { // last projectile, link up with first projectile
486 prevproj.queuenext = proj;
487 firstproj.queueprev = proj;
488 proj.queuenext = firstproj;
489 proj.queueprev = prevproj;
491 else { // else link up with previous projectile
492 prevproj.queuenext = proj;
493 proj.queueprev = prevproj;
498 proj.movetype = MOVETYPE_BOUNCEMISSILE;
499 PROJECTILE_MAKETRIGGER(proj);
500 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
501 //proj.gravity = 0.001;
503 setorigin (proj, w_shotorg);
504 setsize(proj, '0 0 0', '0 0 0');
506 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
513 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
517 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
518 s = w_shotdir + right * s_y + up * s_z;
522 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
525 W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE);
526 proj.touch = W_Crylink_Touch;
527 proj.think = W_Crylink_Fadethink;
528 if(counter == (shots - 1) / 2)
530 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
531 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
532 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
536 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
537 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
538 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
540 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
541 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
542 //proj.scale = 1 + 1 * proj.cnt;
544 proj.angles = vectoangles (proj.velocity);
546 //proj.glow_size = 20;
548 proj.flags = FL_PROJECTILE;
549 proj.missile_flags = MIF_SPLASH;
551 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
553 other = proj; MUTATOR_CALLHOOK(EditProjectile);
555 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
557 self.crylink_lastgroup = proj;
558 W_Crylink_CheckLinks(proj);
559 self.crylink_waitrelease = 2;
563 float W_Crylink(float req)
571 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE);
573 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE);
579 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) // forced reload
580 WEP_ACTION(self.weapon, WR_RELOAD);
582 if (self.BUTTON_ATCK)
584 if (self.crylink_waitrelease != 1)
585 if (weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
588 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
592 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
594 if (self.crylink_waitrelease != 2)
595 if (weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
598 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
602 if ((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
604 if (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
606 // fired and released now!
607 if(self.crylink_lastgroup)
610 entity linkjoineffect;
611 float isprimary = (self.crylink_waitrelease == 1);
613 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
615 linkjoineffect = spawn();
616 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
617 linkjoineffect.classname = "linkjoineffect";
618 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
619 linkjoineffect.owner = self;
620 setorigin(linkjoineffect, pos);
622 self.crylink_waitrelease = 0;
623 if(!W_Crylink(WR_CHECKAMMO1) && !W_Crylink(WR_CHECKAMMO2))
624 if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
627 self.cnt = WEP_CRYLINK;
628 self.switchweapon = w_getbestweapon(self);
637 precache_model ("models/weapons/g_crylink.md3");
638 precache_model ("models/weapons/v_crylink.md3");
639 precache_model ("models/weapons/h_crylink.iqm");
640 precache_sound ("weapons/crylink_fire.wav");
641 precache_sound ("weapons/crylink_fire2.wav");
642 precache_sound ("weapons/crylink_linkjoin.wav");
643 CRYLINK_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
648 // don't "run out of ammo" and switch weapons while waiting for release
649 if(self.crylink_lastgroup && self.crylink_waitrelease)
652 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
653 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo);
658 // don't "run out of ammo" and switch weapons while waiting for release
659 if(self.crylink_lastgroup && self.crylink_waitrelease)
662 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
663 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo);
668 CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
673 W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), "weapons/reload.wav");
676 case WR_SUICIDEMESSAGE:
678 return WEAPON_CRYLINK_SUICIDE;
682 return WEAPON_CRYLINK_MURDER;
689 float W_Crylink(float req)
693 case WR_IMPACTEFFECT:
696 org2 = w_org + w_backoff * 2;
697 if(w_deathtype & HITTYPE_SECONDARY)
699 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
701 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
705 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
707 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
714 precache_sound("weapons/crylink_impact2.wav");
715 precache_sound("weapons/crylink_impact.wav");
720 // no weapon specific image for this weapon