3 /* WEP_##id */ CRYLINK,
4 /* function */ w_crylink,
5 /* ammotype */ IT_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(weapon) \
15 WEP_ADD_CVAR(weapon, MO_BOTH, ammo) \
16 WEP_ADD_CVAR(weapon, MO_BOTH, animtime) \
17 WEP_ADD_CVAR(weapon, MO_BOTH, damage) \
18 WEP_ADD_CVAR(weapon, MO_BOTH, edgedamage) \
19 WEP_ADD_CVAR(weapon, MO_BOTH, radius) \
20 WEP_ADD_CVAR(weapon, MO_BOTH, force) \
21 WEP_ADD_CVAR(weapon, MO_BOTH, spread) \
22 WEP_ADD_CVAR(weapon, MO_BOTH, refire) \
23 WEP_ADD_CVAR(weapon, MO_BOTH, speed) \
24 WEP_ADD_CVAR(weapon, MO_BOTH, shots) \
25 WEP_ADD_CVAR(weapon, MO_BOTH, bounces) \
26 WEP_ADD_CVAR(weapon, MO_BOTH, bouncedamagefactor) \
27 WEP_ADD_CVAR(weapon, MO_BOTH, middle_lifetime) \
28 WEP_ADD_CVAR(weapon, MO_BOTH, middle_fadetime) \
29 WEP_ADD_CVAR(weapon, MO_BOTH, other_lifetime) \
30 WEP_ADD_CVAR(weapon, MO_BOTH, other_fadetime) \
31 WEP_ADD_CVAR(weapon, MO_BOTH, linkexplode) \
32 WEP_ADD_CVAR(weapon, MO_BOTH, joindelay) \
33 WEP_ADD_CVAR(weapon, MO_BOTH, joinspread) \
34 WEP_ADD_CVAR(weapon, MO_BOTH, joinexplode) \
35 WEP_ADD_CVAR(weapon, MO_BOTH, joinexplode_damage) \
36 WEP_ADD_CVAR(weapon, MO_BOTH, joinexplode_edgedamage) \
37 WEP_ADD_CVAR(weapon, MO_BOTH, joinexplode_radius) \
38 WEP_ADD_CVAR(weapon, MO_BOTH, joinexplode_force) \
39 WEP_ADD_CVAR(weapon, MO_SEC, spreadtype) \
40 WEP_ADD_PROP(weapon, reloading_ammo, reload_ammo) \
41 WEP_ADD_PROP(weapon, reloading_time, reload_time) \
42 WEP_ADD_PROP(weapon, switchdelay_raise, switchdelay_raise) \
43 WEP_ADD_PROP(weapon, switchdelay_drop, switchdelay_drop)
46 CRYLINK_SETTINGS(crylink)
48 .float crylink_waitrelease;
49 .entity crylink_lastgroup;
56 void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
58 void W_Crylink_CheckLinks(entity e)
64 error("W_Crylink_CheckLinks: entity is world");
65 if(e.classname != "spike" || wasfreed(e))
66 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
69 for(i = 0; i < 1000; ++i)
71 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
72 error("W_Crylink_CheckLinks: queue is inconsistent");
78 error("W_Crylink_CheckLinks: infinite chain");
81 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
83 W_Crylink_CheckLinks(next);
84 if(me == own.crylink_lastgroup)
85 own.crylink_lastgroup = ((me == next) ? world : next);
86 prev.queuenext = next;
87 next.queueprev = prev;
88 me.classname = "spike_oktoremove";
90 W_Crylink_CheckLinks(next);
93 void W_Crylink_Dequeue(entity e)
95 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
98 void W_Crylink_Reset(void)
100 W_Crylink_Dequeue(self);
104 // force projectile to explode
105 void W_Crylink_LinkExplode (entity e, entity e2)
112 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
114 if(e == e.realowner.crylink_lastgroup)
115 e.realowner.crylink_lastgroup = world;
117 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
119 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);
121 W_Crylink_LinkExplode(e.queuenext, e2);
123 e.classname = "spike_oktoremove";
127 // adjust towards center
128 // returns the origin where they will meet... and the time till the meeting is
129 // stored in w_crylink_linkjoin_time.
130 // could possibly network this origin and time, and display a special particle
131 // effect when projectiles meet there :P
132 // jspeed: joining speed (calculate this as join spread * initial speed)
133 float w_crylink_linkjoin_time;
134 vector W_Crylink_LinkJoin(entity e, float jspeed)
136 vector avg_origin, avg_velocity;
141 // FIXME remove this debug code
142 W_Crylink_CheckLinks(e);
144 w_crylink_linkjoin_time = 0;
146 avg_origin = e.origin;
147 avg_velocity = e.velocity;
149 for(p = e; (p = p.queuenext) != e; )
151 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
152 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
155 avg_origin *= (1.0 / n);
156 avg_velocity *= (1.0 / n);
159 return avg_origin; // nothing to do
161 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
162 avg_dist = pow(vlen(e.origin - avg_origin), 2);
163 for(p = e; (p = p.queuenext) != e; )
164 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
165 avg_dist *= (1.0 / n);
166 avg_dist = sqrt(avg_dist);
169 return avg_origin; // no change needed
173 e.velocity = avg_velocity;
174 UpdateCSQCProjectile(e);
175 for(p = e; (p = p.queuenext) != e; )
177 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
178 UpdateCSQCProjectile(p);
180 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
184 w_crylink_linkjoin_time = avg_dist / jspeed;
185 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
187 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
188 UpdateCSQCProjectile(e);
189 for(p = e; (p = p.queuenext) != e; )
191 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
192 UpdateCSQCProjectile(p);
196 // jspeed -> +infinity:
197 // w_crylink_linkjoin_time -> +0
198 // targ_origin -> avg_origin
199 // p->velocity -> HUEG towards center
201 // w_crylink_linkjoin_time -> +/- infinity
202 // targ_origin -> avg_velocity * +/- infinity
203 // p->velocity -> avg_velocity
204 // jspeed -> -infinity:
205 // w_crylink_linkjoin_time -> -0
206 // targ_origin -> avg_origin
207 // p->velocity -> HUEG away from center
210 W_Crylink_CheckLinks(e);
215 void W_Crylink_LinkJoinEffect_Think()
217 // is there at least 2 projectiles very close?
220 e = self.owner.crylink_lastgroup;
224 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
226 for(p = e; (p = p.queuenext) != e; )
228 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
233 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
235 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
237 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
238 RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
239 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
240 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n, e.realowner, world,
241 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n, e.projectiledeathtype, other);
242 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
249 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
251 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE);
252 float hit_friendly = 0;
257 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
259 if(SAME_TEAM(head, projectile.realowner))
268 return (hit_enemy ? FALSE : hit_friendly);
271 // NO bounce protection, as bounces are limited!
272 void W_Crylink_Touch (void)
276 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
280 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
282 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
286 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
290 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);
292 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)))))
294 if(self == self.realowner.crylink_lastgroup)
295 self.realowner.crylink_lastgroup = world;
296 W_Crylink_LinkExplode(self.queuenext, self);
297 self.classname = "spike_oktoremove";
304 W_Crylink_Dequeue(self);
308 self.cnt = self.cnt - 1;
309 self.angles = vectoangles(self.velocity);
311 self.projectiledeathtype |= HITTYPE_BOUNCE;
312 // commented out as it causes a little hitch...
314 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
317 void W_Crylink_Fadethink (void)
319 W_Crylink_Dequeue(self);
323 void W_Crylink_Attack (void)
325 float counter, shots;
326 entity proj, prevproj, firstproj;
328 vector forward, right, up;
331 W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_reload_ammo);
333 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
334 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
335 if(WEP_CVAR_PRI(crylink, joinexplode))
336 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
338 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg);
343 shots = WEP_CVAR_PRI(crylink, shots);
344 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
345 proj = prevproj = firstproj = world;
346 for(counter = 0; counter < shots; ++counter)
349 proj.reset = W_Crylink_Reset;
350 proj.realowner = proj.owner = self;
351 proj.classname = "spike";
352 proj.bot_dodge = TRUE;
353 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
355 proj.queuenext = proj;
356 proj.queueprev = proj;
358 else if(counter == 0) { // first projectile, store in firstproj for now
361 else if(counter == shots - 1) { // last projectile, link up with first projectile
362 prevproj.queuenext = proj;
363 firstproj.queueprev = proj;
364 proj.queuenext = firstproj;
365 proj.queueprev = prevproj;
367 else { // else link up with previous projectile
368 prevproj.queuenext = proj;
369 proj.queueprev = prevproj;
374 proj.movetype = MOVETYPE_BOUNCEMISSILE;
375 PROJECTILE_MAKETRIGGER(proj);
376 proj.projectiledeathtype = WEP_CRYLINK;
377 //proj.gravity = 0.001;
379 setorigin (proj, w_shotorg);
380 setsize(proj, '0 0 0', '0 0 0');
388 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
392 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
393 W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE);
394 proj.touch = W_Crylink_Touch;
396 proj.think = W_Crylink_Fadethink;
399 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
400 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
401 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
405 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
406 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
407 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
409 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
410 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
411 //proj.scale = 1 + 1 * proj.cnt;
413 proj.angles = vectoangles (proj.velocity);
415 //proj.glow_size = 20;
417 proj.flags = FL_PROJECTILE;
418 proj.missile_flags = MIF_SPLASH;
420 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
422 other = proj; MUTATOR_CALLHOOK(EditProjectile);
424 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
426 self.crylink_lastgroup = proj;
427 W_Crylink_CheckLinks(proj);
428 self.crylink_waitrelease = 1;
432 void W_Crylink_Attack2 (void)
434 float counter, shots;
435 entity proj, prevproj, firstproj;
437 vector forward, right, up;
440 W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_secondary_ammo, autocvar_g_balance_crylink_reload_ammo);
442 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
443 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
444 if(WEP_CVAR_SEC(crylink, joinexplode))
445 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
447 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg);
452 shots = WEP_CVAR_SEC(crylink, shots);
453 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
454 proj = prevproj = firstproj = world;
455 for(counter = 0; counter < shots; ++counter)
458 proj.reset = W_Crylink_Reset;
459 proj.realowner = proj.owner = self;
460 proj.classname = "spike";
461 proj.bot_dodge = TRUE;
462 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
464 proj.queuenext = proj;
465 proj.queueprev = proj;
467 else if(counter == 0) { // first projectile, store in firstproj for now
470 else if(counter == shots - 1) { // last projectile, link up with first projectile
471 prevproj.queuenext = proj;
472 firstproj.queueprev = proj;
473 proj.queuenext = firstproj;
474 proj.queueprev = prevproj;
476 else { // else link up with previous projectile
477 prevproj.queuenext = proj;
478 proj.queueprev = prevproj;
483 proj.movetype = MOVETYPE_BOUNCEMISSILE;
484 PROJECTILE_MAKETRIGGER(proj);
485 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
486 //proj.gravity = 0.001;
488 setorigin (proj, w_shotorg);
489 setsize(proj, '0 0 0', '0 0 0');
491 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
498 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
502 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
503 s = w_shotdir + right * s_y + up * s_z;
507 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
510 W_SetupProjectileVelocityEx(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE);
511 proj.touch = W_Crylink_Touch;
512 proj.think = W_Crylink_Fadethink;
513 if(counter == (shots - 1) / 2)
515 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
516 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
517 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
521 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
522 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
523 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
525 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
526 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
527 //proj.scale = 1 + 1 * proj.cnt;
529 proj.angles = vectoangles (proj.velocity);
531 //proj.glow_size = 20;
533 proj.flags = FL_PROJECTILE;
534 proj.missile_flags = MIF_SPLASH;
536 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
538 other = proj; MUTATOR_CALLHOOK(EditProjectile);
540 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
542 self.crylink_lastgroup = proj;
543 W_Crylink_CheckLinks(proj);
544 self.crylink_waitrelease = 2;
548 float w_crylink(float req)
556 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE);
558 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE);
564 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
565 WEP_ACTION(self.weapon, WR_RELOAD);
567 if (self.BUTTON_ATCK)
569 if (self.crylink_waitrelease != 1)
570 if (weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
573 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
577 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
579 if (self.crylink_waitrelease != 2)
580 if (weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
583 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
587 if ((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
589 if (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
591 // fired and released now!
592 if(self.crylink_lastgroup)
595 entity linkjoineffect;
596 float isprimary = (self.crylink_waitrelease == 1);
598 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
600 linkjoineffect = spawn();
601 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
602 linkjoineffect.classname = "linkjoineffect";
603 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
604 linkjoineffect.owner = self;
605 setorigin(linkjoineffect, pos);
607 self.crylink_waitrelease = 0;
608 if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
609 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
612 self.cnt = WEP_CRYLINK;
613 self.switchweapon = w_getbestweapon(self);
622 precache_model ("models/weapons/g_crylink.md3");
623 precache_model ("models/weapons/v_crylink.md3");
624 precache_model ("models/weapons/h_crylink.iqm");
625 precache_sound ("weapons/crylink_fire.wav");
626 precache_sound ("weapons/crylink_fire2.wav");
627 precache_sound ("weapons/crylink_linkjoin.wav");
628 WEP_SET_PROPS(CRYLINK_SETTINGS(crylink), WEP_CRYLINK)
633 self.current_ammo = ammo_cells;
638 // don't "run out of ammo" and switch weapons while waiting for release
639 if(self.crylink_lastgroup && self.crylink_waitrelease)
642 ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo;
643 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_primary_ammo;
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.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo;
653 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_secondary_ammo;
658 WEP_CONFIG_SETTINGS(CRYLINK_SETTINGS(crylink))
663 W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), "weapons/reload.wav");
666 case WR_SUICIDEMESSAGE:
668 return WEAPON_CRYLINK_SUICIDE;
672 return WEAPON_CRYLINK_MURDER;
679 float w_crylink(float req)
683 case WR_IMPACTEFFECT:
686 org2 = w_org + w_backoff * 2;
687 if(w_deathtype & HITTYPE_SECONDARY)
689 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
691 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
695 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
697 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
704 precache_sound("weapons/crylink_impact2.wav");
705 precache_sound("weapons/crylink_impact.wav");