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.4",
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;
66 void spawnfunc_weapon_crylink(void) { weapon_defaultspawnfunc(WEP_CRYLINK); }
68 void W_Crylink_CheckLinks(entity e)
74 error("W_Crylink_CheckLinks: entity is world");
75 if(e.classname != "spike" || wasfreed(e))
76 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
79 for(i = 0; i < 1000; ++i)
81 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
82 error("W_Crylink_CheckLinks: queue is inconsistent");
88 error("W_Crylink_CheckLinks: infinite chain");
91 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
93 W_Crylink_CheckLinks(next);
94 if(me == own.crylink_lastgroup)
95 own.crylink_lastgroup = ((me == next) ? world : next);
96 prev.queuenext = next;
97 next.queueprev = prev;
98 me.classname = "spike_oktoremove";
100 W_Crylink_CheckLinks(next);
103 void W_Crylink_Dequeue(entity e)
105 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
108 void W_Crylink_Reset(void)
110 W_Crylink_Dequeue(self);
114 // force projectile to explode
115 void W_Crylink_LinkExplode(entity e, entity e2)
122 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
124 if(e == e.realowner.crylink_lastgroup)
125 e.realowner.crylink_lastgroup = world;
127 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
129 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);
131 W_Crylink_LinkExplode(e.queuenext, e2);
133 e.classname = "spike_oktoremove";
137 // adjust towards center
138 // returns the origin where they will meet... and the time till the meeting is
139 // stored in w_crylink_linkjoin_time.
140 // could possibly network this origin and time, and display a special particle
141 // effect when projectiles meet there :P
142 // jspeed: joining speed (calculate this as join spread * initial speed)
143 float w_crylink_linkjoin_time;
144 vector W_Crylink_LinkJoin(entity e, float jspeed)
146 vector avg_origin, avg_velocity;
151 // FIXME remove this debug code
152 W_Crylink_CheckLinks(e);
154 w_crylink_linkjoin_time = 0;
156 avg_origin = e.origin;
157 avg_velocity = e.velocity;
159 for(p = e; (p = p.queuenext) != e; )
161 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
162 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
165 avg_origin *= (1.0 / n);
166 avg_velocity *= (1.0 / n);
169 return avg_origin; // nothing to do
171 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
172 avg_dist = pow(vlen(e.origin - avg_origin), 2);
173 for(p = e; (p = p.queuenext) != e; )
174 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
175 avg_dist *= (1.0 / n);
176 avg_dist = sqrt(avg_dist);
179 return avg_origin; // no change needed
183 e.velocity = avg_velocity;
184 UpdateCSQCProjectile(e);
185 for(p = e; (p = p.queuenext) != e; )
187 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
188 UpdateCSQCProjectile(p);
190 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
194 w_crylink_linkjoin_time = avg_dist / jspeed;
195 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
197 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
198 UpdateCSQCProjectile(e);
199 for(p = e; (p = p.queuenext) != e; )
201 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
202 UpdateCSQCProjectile(p);
206 // jspeed -> +infinity:
207 // w_crylink_linkjoin_time -> +0
208 // targ_origin -> avg_origin
209 // p->velocity -> HUEG towards center
211 // w_crylink_linkjoin_time -> +/- infinity
212 // targ_origin -> avg_velocity * +/- infinity
213 // p->velocity -> avg_velocity
214 // jspeed -> -infinity:
215 // w_crylink_linkjoin_time -> -0
216 // targ_origin -> avg_origin
217 // p->velocity -> HUEG away from center
220 W_Crylink_CheckLinks(e);
225 void W_Crylink_LinkJoinEffect_Think(void)
227 // is there at least 2 projectiles very close?
230 e = self.owner.crylink_lastgroup;
234 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
236 for(p = e; (p = p.queuenext) != e; )
238 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
243 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
245 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
247 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
251 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
252 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
253 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n,
256 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n,
257 e.projectiledeathtype,
260 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
267 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
269 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE);
270 float hit_friendly = 0;
275 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
277 if(SAME_TEAM(head, projectile.realowner))
286 return (hit_enemy ? FALSE : hit_friendly);
289 // NO bounce protection, as bounces are limited!
290 void W_Crylink_Touch(void)
294 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
298 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
300 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
304 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
308 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);
310 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)))))
312 if(self == self.realowner.crylink_lastgroup)
313 self.realowner.crylink_lastgroup = world;
314 W_Crylink_LinkExplode(self.queuenext, self);
315 self.classname = "spike_oktoremove";
322 W_Crylink_Dequeue(self);
326 self.cnt = self.cnt - 1;
327 self.angles = vectoangles(self.velocity);
329 self.projectiledeathtype |= HITTYPE_BOUNCE;
330 // commented out as it causes a little hitch...
332 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
335 void W_Crylink_Fadethink(void)
337 W_Crylink_Dequeue(self);
341 void W_Crylink_Attack(void)
343 float counter, shots;
344 entity proj, prevproj, firstproj;
346 vector forward, right, up;
349 W_DecreaseAmmo(WEP_CVAR_PRI(crylink, ammo));
351 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
352 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
353 if(WEP_CVAR_PRI(crylink, joinexplode))
354 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
356 W_SetupShot(self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg);
361 shots = WEP_CVAR_PRI(crylink, shots);
362 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
363 proj = prevproj = firstproj = world;
364 for(counter = 0; counter < shots; ++counter)
367 proj.reset = W_Crylink_Reset;
368 proj.realowner = proj.owner = self;
369 proj.classname = "spike";
370 proj.bot_dodge = TRUE;
371 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
373 proj.queuenext = proj;
374 proj.queueprev = proj;
376 else if(counter == 0) { // first projectile, store in firstproj for now
379 else if(counter == shots - 1) { // last projectile, link up with first projectile
380 prevproj.queuenext = proj;
381 firstproj.queueprev = proj;
382 proj.queuenext = firstproj;
383 proj.queueprev = prevproj;
385 else { // else link up with previous projectile
386 prevproj.queuenext = proj;
387 proj.queueprev = prevproj;
392 proj.movetype = MOVETYPE_BOUNCEMISSILE;
393 PROJECTILE_MAKETRIGGER(proj);
394 proj.projectiledeathtype = WEP_CRYLINK;
395 //proj.gravity = 0.001;
397 setorigin(proj, w_shotorg);
398 setsize(proj, '0 0 0', '0 0 0');
406 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
410 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
411 W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s_y + up * s_z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE);
412 proj.touch = W_Crylink_Touch;
414 proj.think = W_Crylink_Fadethink;
417 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
418 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
419 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
423 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
424 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
425 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
427 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
428 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
429 //proj.scale = 1 + 1 * proj.cnt;
431 proj.angles = vectoangles(proj.velocity);
433 //proj.glow_size = 20;
435 proj.flags = FL_PROJECTILE;
436 proj.missile_flags = MIF_SPLASH;
438 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
440 other = proj; MUTATOR_CALLHOOK(EditProjectile);
442 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
444 self.crylink_lastgroup = proj;
445 W_Crylink_CheckLinks(proj);
446 self.crylink_waitrelease = 1;
450 void W_Crylink_Attack2(void)
452 float counter, shots;
453 entity proj, prevproj, firstproj;
455 vector forward, right, up;
458 W_DecreaseAmmo(WEP_CVAR_SEC(crylink, ammo));
460 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
461 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
462 if(WEP_CVAR_SEC(crylink, joinexplode))
463 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
465 W_SetupShot(self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg);
470 shots = WEP_CVAR_SEC(crylink, shots);
471 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
472 proj = prevproj = firstproj = world;
473 for(counter = 0; counter < shots; ++counter)
476 proj.reset = W_Crylink_Reset;
477 proj.realowner = proj.owner = self;
478 proj.classname = "spike";
479 proj.bot_dodge = TRUE;
480 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
482 proj.queuenext = proj;
483 proj.queueprev = proj;
485 else if(counter == 0) { // first projectile, store in firstproj for now
488 else if(counter == shots - 1) { // last projectile, link up with first projectile
489 prevproj.queuenext = proj;
490 firstproj.queueprev = proj;
491 proj.queuenext = firstproj;
492 proj.queueprev = prevproj;
494 else { // else link up with previous projectile
495 prevproj.queuenext = proj;
496 proj.queueprev = prevproj;
501 proj.movetype = MOVETYPE_BOUNCEMISSILE;
502 PROJECTILE_MAKETRIGGER(proj);
503 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
504 //proj.gravity = 0.001;
506 setorigin(proj, w_shotorg);
507 setsize(proj, '0 0 0', '0 0 0');
509 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
516 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
520 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
521 s = w_shotdir + right * s_y + up * s_z;
525 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
528 W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE);
529 proj.touch = W_Crylink_Touch;
530 proj.think = W_Crylink_Fadethink;
531 if(counter == (shots - 1) / 2)
533 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
534 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
535 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
539 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
540 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
541 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
543 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
544 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
545 //proj.scale = 1 + 1 * proj.cnt;
547 proj.angles = vectoangles(proj.velocity);
549 //proj.glow_size = 20;
551 proj.flags = FL_PROJECTILE;
552 proj.missile_flags = MIF_SPLASH;
554 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
556 other = proj; MUTATOR_CALLHOOK(EditProjectile);
558 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
560 self.crylink_lastgroup = proj;
561 W_Crylink_CheckLinks(proj);
562 self.crylink_waitrelease = 2;
566 float W_Crylink(float req)
574 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE);
576 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE);
582 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) // forced reload
583 WEP_ACTION(self.weapon, WR_RELOAD);
587 if(self.crylink_waitrelease != 1)
588 if(weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
591 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
595 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
597 if(self.crylink_waitrelease != 2)
598 if(weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
601 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
605 if((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
607 if(!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
609 // fired and released now!
610 if(self.crylink_lastgroup)
613 entity linkjoineffect;
614 float isprimary = (self.crylink_waitrelease == 1);
616 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
618 linkjoineffect = spawn();
619 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
620 linkjoineffect.classname = "linkjoineffect";
621 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
622 linkjoineffect.owner = self;
623 setorigin(linkjoineffect, pos);
625 self.crylink_waitrelease = 0;
626 if(!W_Crylink(WR_CHECKAMMO1) && !W_Crylink(WR_CHECKAMMO2))
627 if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
630 self.cnt = WEP_CRYLINK;
631 self.switchweapon = w_getbestweapon(self);
640 precache_model("models/weapons/g_crylink.md3");
641 precache_model("models/weapons/v_crylink.md3");
642 precache_model("models/weapons/h_crylink.iqm");
643 precache_sound("weapons/crylink_fire.wav");
644 precache_sound("weapons/crylink_fire2.wav");
645 precache_sound("weapons/crylink_linkjoin.wav");
646 CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
651 // don't "run out of ammo" and switch weapons while waiting for release
652 if(self.crylink_lastgroup && self.crylink_waitrelease)
655 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
656 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo);
661 // don't "run out of ammo" and switch weapons while waiting for release
662 if(self.crylink_lastgroup && self.crylink_waitrelease)
665 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
666 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo);
671 CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
676 W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), "weapons/reload.wav");
679 case WR_SUICIDEMESSAGE:
681 return WEAPON_CRYLINK_SUICIDE;
685 return WEAPON_CRYLINK_MURDER;
692 float W_Crylink(float req)
696 case WR_IMPACTEFFECT:
699 org2 = w_org + w_backoff * 2;
700 if(w_deathtype & HITTYPE_SECONDARY)
702 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
704 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
708 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
710 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
717 precache_sound("weapons/crylink_impact2.wav");
718 precache_sound("weapons/crylink_impact.wav");
723 // no weapon specific image for this weapon