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 /* netname */ "crylink",
11 /* fullname */ _("Crylink")
14 #define CRYLINK_SETTINGS(w_cvar,w_prop) CRYLINK_SETTINGS_LIST(w_cvar, w_prop, CRYLINK, crylink)
15 #define CRYLINK_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
16 w_cvar(id, sn, MO_BOTH, ammo) \
17 w_cvar(id, sn, MO_BOTH, animtime) \
18 w_cvar(id, sn, MO_BOTH, damage) \
19 w_cvar(id, sn, MO_BOTH, edgedamage) \
20 w_cvar(id, sn, MO_BOTH, radius) \
21 w_cvar(id, sn, MO_BOTH, force) \
22 w_cvar(id, sn, MO_BOTH, spread) \
23 w_cvar(id, sn, MO_BOTH, refire) \
24 w_cvar(id, sn, MO_BOTH, speed) \
25 w_cvar(id, sn, MO_BOTH, shots) \
26 w_cvar(id, sn, MO_BOTH, bounces) \
27 w_cvar(id, sn, MO_BOTH, bouncedamagefactor) \
28 w_cvar(id, sn, MO_BOTH, middle_lifetime) \
29 w_cvar(id, sn, MO_BOTH, middle_fadetime) \
30 w_cvar(id, sn, MO_BOTH, other_lifetime) \
31 w_cvar(id, sn, MO_BOTH, other_fadetime) \
32 w_cvar(id, sn, MO_BOTH, linkexplode) \
33 w_cvar(id, sn, MO_BOTH, joindelay) \
34 w_cvar(id, sn, MO_BOTH, joinspread) \
35 w_cvar(id, sn, MO_BOTH, joinexplode) \
36 w_cvar(id, sn, MO_BOTH, joinexplode_damage) \
37 w_cvar(id, sn, MO_BOTH, joinexplode_edgedamage) \
38 w_cvar(id, sn, MO_BOTH, joinexplode_radius) \
39 w_cvar(id, sn, MO_BOTH, joinexplode_force) \
40 w_cvar(id, sn, MO_SEC, spreadtype) \
41 w_prop(id, sn, float, reloading_ammo, reload_ammo) \
42 w_prop(id, sn, float, reloading_time, reload_time) \
43 w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \
44 w_prop(id, sn, float, switchdelay_drop, switchdelay_drop) \
45 w_prop(id, sn, string, weaponreplace, weaponreplace) \
46 w_prop(id, sn, float, weaponstart, weaponstart) \
47 w_prop(id, sn, float, weaponstartoverride, weaponstartoverride)
50 CRYLINK_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
52 .float crylink_waitrelease;
53 .entity crylink_lastgroup;
60 void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
62 void W_Crylink_CheckLinks(entity e)
68 error("W_Crylink_CheckLinks: entity is world");
69 if(e.classname != "spike" || wasfreed(e))
70 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
73 for(i = 0; i < 1000; ++i)
75 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
76 error("W_Crylink_CheckLinks: queue is inconsistent");
82 error("W_Crylink_CheckLinks: infinite chain");
85 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
87 W_Crylink_CheckLinks(next);
88 if(me == own.crylink_lastgroup)
89 own.crylink_lastgroup = ((me == next) ? world : next);
90 prev.queuenext = next;
91 next.queueprev = prev;
92 me.classname = "spike_oktoremove";
94 W_Crylink_CheckLinks(next);
97 void W_Crylink_Dequeue(entity e)
99 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
102 void W_Crylink_Reset(void)
104 W_Crylink_Dequeue(self);
108 // force projectile to explode
109 void W_Crylink_LinkExplode (entity e, entity e2)
116 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
118 if(e == e.realowner.crylink_lastgroup)
119 e.realowner.crylink_lastgroup = world;
121 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
123 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);
125 W_Crylink_LinkExplode(e.queuenext, e2);
127 e.classname = "spike_oktoremove";
131 // adjust towards center
132 // returns the origin where they will meet... and the time till the meeting is
133 // stored in w_crylink_linkjoin_time.
134 // could possibly network this origin and time, and display a special particle
135 // effect when projectiles meet there :P
136 // jspeed: joining speed (calculate this as join spread * initial speed)
137 float w_crylink_linkjoin_time;
138 vector W_Crylink_LinkJoin(entity e, float jspeed)
140 vector avg_origin, avg_velocity;
145 // FIXME remove this debug code
146 W_Crylink_CheckLinks(e);
148 w_crylink_linkjoin_time = 0;
150 avg_origin = e.origin;
151 avg_velocity = e.velocity;
153 for(p = e; (p = p.queuenext) != e; )
155 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
156 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
159 avg_origin *= (1.0 / n);
160 avg_velocity *= (1.0 / n);
163 return avg_origin; // nothing to do
165 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
166 avg_dist = pow(vlen(e.origin - avg_origin), 2);
167 for(p = e; (p = p.queuenext) != e; )
168 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
169 avg_dist *= (1.0 / n);
170 avg_dist = sqrt(avg_dist);
173 return avg_origin; // no change needed
177 e.velocity = avg_velocity;
178 UpdateCSQCProjectile(e);
179 for(p = e; (p = p.queuenext) != e; )
181 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
182 UpdateCSQCProjectile(p);
184 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
188 w_crylink_linkjoin_time = avg_dist / jspeed;
189 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
191 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
192 UpdateCSQCProjectile(e);
193 for(p = e; (p = p.queuenext) != e; )
195 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
196 UpdateCSQCProjectile(p);
200 // jspeed -> +infinity:
201 // w_crylink_linkjoin_time -> +0
202 // targ_origin -> avg_origin
203 // p->velocity -> HUEG towards center
205 // w_crylink_linkjoin_time -> +/- infinity
206 // targ_origin -> avg_velocity * +/- infinity
207 // p->velocity -> avg_velocity
208 // jspeed -> -infinity:
209 // w_crylink_linkjoin_time -> -0
210 // targ_origin -> avg_origin
211 // p->velocity -> HUEG away from center
214 W_Crylink_CheckLinks(e);
219 void W_Crylink_LinkJoinEffect_Think()
221 // is there at least 2 projectiles very close?
224 e = self.owner.crylink_lastgroup;
228 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
230 for(p = e; (p = p.queuenext) != e; )
232 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
237 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
239 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
241 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
242 RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
243 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
244 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n, e.realowner, world,
245 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n, e.projectiledeathtype, other);
246 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
253 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
255 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE);
256 float hit_friendly = 0;
261 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
263 if(SAME_TEAM(head, projectile.realowner))
272 return (hit_enemy ? FALSE : hit_friendly);
275 // NO bounce protection, as bounces are limited!
276 void W_Crylink_Touch (void)
280 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
284 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
286 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
290 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
294 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);
296 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)))))
298 if(self == self.realowner.crylink_lastgroup)
299 self.realowner.crylink_lastgroup = world;
300 W_Crylink_LinkExplode(self.queuenext, self);
301 self.classname = "spike_oktoremove";
308 W_Crylink_Dequeue(self);
312 self.cnt = self.cnt - 1;
313 self.angles = vectoangles(self.velocity);
315 self.projectiledeathtype |= HITTYPE_BOUNCE;
316 // commented out as it causes a little hitch...
318 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
321 void W_Crylink_Fadethink (void)
323 W_Crylink_Dequeue(self);
327 void W_Crylink_Attack (void)
329 float counter, shots;
330 entity proj, prevproj, firstproj;
332 vector forward, right, up;
335 W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_reload_ammo);
337 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
338 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
339 if(WEP_CVAR_PRI(crylink, joinexplode))
340 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
342 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg);
347 shots = WEP_CVAR_PRI(crylink, shots);
348 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
349 proj = prevproj = firstproj = world;
350 for(counter = 0; counter < shots; ++counter)
353 proj.reset = W_Crylink_Reset;
354 proj.realowner = proj.owner = self;
355 proj.classname = "spike";
356 proj.bot_dodge = TRUE;
357 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
359 proj.queuenext = proj;
360 proj.queueprev = proj;
362 else if(counter == 0) { // first projectile, store in firstproj for now
365 else if(counter == shots - 1) { // last projectile, link up with first projectile
366 prevproj.queuenext = proj;
367 firstproj.queueprev = proj;
368 proj.queuenext = firstproj;
369 proj.queueprev = prevproj;
371 else { // else link up with previous projectile
372 prevproj.queuenext = proj;
373 proj.queueprev = prevproj;
378 proj.movetype = MOVETYPE_BOUNCEMISSILE;
379 PROJECTILE_MAKETRIGGER(proj);
380 proj.projectiledeathtype = WEP_CRYLINK;
381 //proj.gravity = 0.001;
383 setorigin (proj, w_shotorg);
384 setsize(proj, '0 0 0', '0 0 0');
392 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
396 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
397 W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE);
398 proj.touch = W_Crylink_Touch;
400 proj.think = W_Crylink_Fadethink;
403 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
404 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
405 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
409 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
410 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
411 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
413 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
414 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
415 //proj.scale = 1 + 1 * proj.cnt;
417 proj.angles = vectoangles (proj.velocity);
419 //proj.glow_size = 20;
421 proj.flags = FL_PROJECTILE;
422 proj.missile_flags = MIF_SPLASH;
424 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
426 other = proj; MUTATOR_CALLHOOK(EditProjectile);
428 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
430 self.crylink_lastgroup = proj;
431 W_Crylink_CheckLinks(proj);
432 self.crylink_waitrelease = 1;
436 void W_Crylink_Attack2 (void)
438 float counter, shots;
439 entity proj, prevproj, firstproj;
441 vector forward, right, up;
444 W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_secondary_ammo, autocvar_g_balance_crylink_reload_ammo);
446 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
447 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
448 if(WEP_CVAR_SEC(crylink, joinexplode))
449 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
451 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg);
456 shots = WEP_CVAR_SEC(crylink, shots);
457 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
458 proj = prevproj = firstproj = world;
459 for(counter = 0; counter < shots; ++counter)
462 proj.reset = W_Crylink_Reset;
463 proj.realowner = proj.owner = self;
464 proj.classname = "spike";
465 proj.bot_dodge = TRUE;
466 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
468 proj.queuenext = proj;
469 proj.queueprev = proj;
471 else if(counter == 0) { // first projectile, store in firstproj for now
474 else if(counter == shots - 1) { // last projectile, link up with first projectile
475 prevproj.queuenext = proj;
476 firstproj.queueprev = proj;
477 proj.queuenext = firstproj;
478 proj.queueprev = prevproj;
480 else { // else link up with previous projectile
481 prevproj.queuenext = proj;
482 proj.queueprev = prevproj;
487 proj.movetype = MOVETYPE_BOUNCEMISSILE;
488 PROJECTILE_MAKETRIGGER(proj);
489 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
490 //proj.gravity = 0.001;
492 setorigin (proj, w_shotorg);
493 setsize(proj, '0 0 0', '0 0 0');
495 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
502 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
506 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
507 s = w_shotdir + right * s_y + up * s_z;
511 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
514 W_SetupProjectileVelocityEx(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE);
515 proj.touch = W_Crylink_Touch;
516 proj.think = W_Crylink_Fadethink;
517 if(counter == (shots - 1) / 2)
519 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
520 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
521 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
525 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
526 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
527 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
529 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
530 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
531 //proj.scale = 1 + 1 * proj.cnt;
533 proj.angles = vectoangles (proj.velocity);
535 //proj.glow_size = 20;
537 proj.flags = FL_PROJECTILE;
538 proj.missile_flags = MIF_SPLASH;
540 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
542 other = proj; MUTATOR_CALLHOOK(EditProjectile);
544 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
546 self.crylink_lastgroup = proj;
547 W_Crylink_CheckLinks(proj);
548 self.crylink_waitrelease = 2;
552 float w_crylink(float req)
560 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE);
562 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE);
568 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo)) // forced reload
569 WEP_ACTION(self.weapon, WR_RELOAD);
571 if (self.BUTTON_ATCK)
573 if (self.crylink_waitrelease != 1)
574 if (weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
577 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
581 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
583 if (self.crylink_waitrelease != 2)
584 if (weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
587 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
591 if ((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
593 if (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
595 // fired and released now!
596 if(self.crylink_lastgroup)
599 entity linkjoineffect;
600 float isprimary = (self.crylink_waitrelease == 1);
602 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
604 linkjoineffect = spawn();
605 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
606 linkjoineffect.classname = "linkjoineffect";
607 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
608 linkjoineffect.owner = self;
609 setorigin(linkjoineffect, pos);
611 self.crylink_waitrelease = 0;
612 if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
613 if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
616 self.cnt = WEP_CRYLINK;
617 self.switchweapon = w_getbestweapon(self);
626 precache_model ("models/weapons/g_crylink.md3");
627 precache_model ("models/weapons/v_crylink.md3");
628 precache_model ("models/weapons/h_crylink.iqm");
629 precache_sound ("weapons/crylink_fire.wav");
630 precache_sound ("weapons/crylink_fire2.wav");
631 precache_sound ("weapons/crylink_linkjoin.wav");
632 CRYLINK_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
637 self.current_ammo = ammo_cells;
642 // don't "run out of ammo" and switch weapons while waiting for release
643 if(self.crylink_lastgroup && self.crylink_waitrelease)
646 ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo;
647 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_primary_ammo;
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.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo;
657 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_secondary_ammo;
662 CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
667 W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), "weapons/reload.wav");
670 case WR_SUICIDEMESSAGE:
672 return WEAPON_CRYLINK_SUICIDE;
676 return WEAPON_CRYLINK_MURDER;
683 float w_crylink(float req)
687 case WR_IMPACTEFFECT:
690 org2 = w_org + w_backoff * 2;
691 if(w_deathtype & HITTYPE_SECONDARY)
693 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
695 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
699 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
701 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
708 precache_sound("weapons/crylink_impact2.wav");
709 precache_sound("weapons/crylink_impact.wav");