2 REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "crylink", "crylink", _("Crylink"));
6 .float crylink_waitrelease;
7 .entity crylink_lastgroup;
12 // weapon load persistence, for weapons that support reloading
15 void W_Crylink_SetAmmoCounter()
17 // set clip_load to the weapon we have switched to, if the gun uses reloading
18 if(!autocvar_g_balance_crylink_reload_ammo)
19 self.clip_load = 0; // also keeps crosshair ammo from displaying
22 self.clip_load = self.crylink_load;
23 self.clip_size = autocvar_g_balance_crylink_reload_ammo; // for the crosshair ammo display
27 void W_Crylink_ReloadedAndReady()
31 // now do the ammo transfer
32 self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
33 while(self.clip_load < autocvar_g_balance_crylink_reload_ammo && self.ammo_cells) // make sure we don't add more ammo than we have
38 self.crylink_load = self.clip_load;
40 t = ATTACK_FINISHED(self) - autocvar_g_balance_crylink_reload_time - 1;
41 ATTACK_FINISHED(self) = t;
45 void W_Crylink_Reload()
47 // return if reloading is disabled for this weapon
48 if(!autocvar_g_balance_crylink_reload_ammo)
51 if(!W_ReloadCheck(self.ammo_cells, min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo)))
56 sound (self, CHAN_WEAPON2, "weapons/reload.wav", VOL_BASE, ATTN_NORM);
58 t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_crylink_reload_time + 1;
59 ATTACK_FINISHED(self) = t;
61 weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_crylink_reload_time, W_Crylink_ReloadedAndReady);
63 self.old_clip_load = self.clip_load;
67 void W_Crylink_CheckLinks(entity e)
73 error("W_Crylink_CheckLinks: entity is world");
74 if(e.classname != "spike")
75 error("W_Crylink_CheckLinks: entity is not a spike");
78 for(i = 0; i < 1000; ++i)
80 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
81 error("W_Crylink_CheckLinks: queue is inconsistent");
87 error("W_Crylink_CheckLinks: infinite chain");
90 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
92 W_Crylink_CheckLinks(next);
93 if(me == own.crylink_lastgroup)
94 own.crylink_lastgroup = ((me == next) ? world : next);
95 prev.queuenext = next;
96 next.queueprev = prev;
98 W_Crylink_CheckLinks(next);
101 void W_Crylink_Dequeue(entity e)
103 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
106 // force projectile to explode
107 void W_Crylink_LinkExplode (entity e, entity e2)
110 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
112 if(e == e.realowner.crylink_lastgroup)
113 e.realowner.crylink_lastgroup = world;
115 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
117 if(e.queuenext != e2)
118 W_Crylink_LinkExplode(e.queuenext, e2);
123 // adjust towards center
124 // returns the origin where they will meet... and the time till the meeting is
125 // stored in w_crylink_linkjoin_time.
126 // could possibly network this origin and time, and display a special particle
127 // effect when projectiles meet there :P
128 // jspeed: MINIMUM jing speed
129 // jtime: MAXIMUM jing time (0: none)
130 float w_crylink_linkjoin_time;
131 vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
133 vector avg_origin, avg_velocity;
138 // FIXME remove this debug code
139 W_Crylink_CheckLinks(e);
141 w_crylink_linkjoin_time = 0;
143 avg_origin = e.origin;
144 avg_velocity = e.velocity;
146 for(p = e; (p = p.queuenext) != e; )
148 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
149 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
152 avg_origin *= (1.0 / n);
153 avg_velocity *= (1.0 / n);
156 return avg_origin; // nothing to do
158 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
159 avg_dist = pow(vlen(e.origin - avg_origin), 2);
160 for(p = e; (p = p.queuenext) != e; )
161 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
162 avg_dist *= (1.0 / n);
163 avg_dist = sqrt(avg_dist);
166 return avg_origin; // no change needed
168 if(jspeed == 0 && jtime == 0)
170 e.velocity = avg_velocity;
171 UpdateCSQCProjectile(e);
172 for(p = e; (p = p.queuenext) != e; )
174 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
175 UpdateCSQCProjectile(p);
183 w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
185 w_crylink_linkjoin_time = jtime;
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 if(e.projectiledeathtype & HITTYPE_SECONDARY)
239 if(autocvar_g_balance_crylink_secondary_joinexplode)
241 n = n / autocvar_g_balance_crylink_secondary_shots;
242 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n,
243 autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n,
244 autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner,
245 autocvar_g_balance_crylink_secondary_joinexplode_force * n, e.projectiledeathtype, other);
247 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
252 if(autocvar_g_balance_crylink_primary_joinexplode)
254 n = n / autocvar_g_balance_crylink_primary_shots;
255 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n,
256 autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n,
257 autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner,
258 autocvar_g_balance_crylink_primary_joinexplode_force * n, e.projectiledeathtype, other);
260 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
269 // NO bounce protection, as bounces are limited!
270 void W_Crylink_Touch (void)
275 local entity savenext, saveprev, saveown;
276 saveown = self.realowner;
277 savenext = self.queuenext;
278 saveprev = self.queueprev;
279 if(WarpZone_Projectile_Touch())
282 W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
287 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
289 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
293 f = autocvar_g_balance_crylink_primary_bouncedamagefactor;
296 if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_primary_damage * f, autocvar_g_balance_crylink_primary_edgedamage * f, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_primary_linkexplode)
298 if(self == self.realowner.crylink_lastgroup)
299 self.realowner.crylink_lastgroup = world;
300 W_Crylink_LinkExplode(self.queuenext, self);
307 W_Crylink_Dequeue(self);
311 self.cnt = self.cnt - 1;
312 self.angles = vectoangles(self.velocity);
314 self.projectiledeathtype |= HITTYPE_BOUNCE;
315 // commented out as it causes a little hitch...
317 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
320 void W_Crylink_Touch2 (void)
325 local entity savenext, saveprev, saveown;
326 savenext = self.queuenext;
327 saveprev = self.queueprev;
328 saveown = self.realowner;
329 if(WarpZone_Projectile_Touch())
332 W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
337 a = 1 - (time - self.fade_time) * self.fade_rate;
339 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
343 f = autocvar_g_balance_crylink_secondary_bouncedamagefactor;
346 if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_secondary_damage * f, autocvar_g_balance_crylink_secondary_edgedamage * f, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_secondary_linkexplode)
348 if(self == self.realowner.crylink_lastgroup)
349 self.realowner.crylink_lastgroup = world;
350 W_Crylink_LinkExplode(self.queuenext, self);
357 W_Crylink_Dequeue(self);
361 self.cnt = self.cnt - 1;
362 self.angles = vectoangles(self.velocity);
364 self.projectiledeathtype |= HITTYPE_BOUNCE;
365 // commented out as it causes a little hitch...
367 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
370 void W_Crylink_Fadethink (void)
372 W_Crylink_Dequeue(self);
376 void W_Crylink_Attack (void)
378 local float counter, shots;
379 local entity proj, prevproj, firstproj;
381 vector forward, right, up;
384 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
385 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
387 if(autocvar_g_balance_crylink_reload_ammo)
389 self.clip_load -= autocvar_g_balance_crylink_primary_ammo;
390 self.crylink_load = self.clip_load;
393 self.ammo_cells -= autocvar_g_balance_crylink_primary_ammo;
396 maxdmg = autocvar_g_balance_crylink_primary_damage*autocvar_g_balance_crylink_primary_shots;
397 maxdmg *= 1 + autocvar_g_balance_crylink_primary_bouncedamagefactor * autocvar_g_balance_crylink_primary_bounces;
398 if(autocvar_g_balance_crylink_primary_joinexplode)
399 maxdmg += autocvar_g_balance_crylink_primary_joinexplode_damage;
401 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CHAN_WEAPON, maxdmg);
406 shots = autocvar_g_balance_crylink_primary_shots;
407 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
409 while (counter < shots)
412 proj.realowner = proj.owner = self;
413 proj.classname = "spike";
414 proj.bot_dodge = TRUE;
415 proj.bot_dodgerating = autocvar_g_balance_crylink_primary_damage;
417 proj.queuenext = proj;
418 proj.queueprev = proj;
420 else if(counter == 0) { // first projectile, store in firstproj for now
423 else if(counter == shots - 1) { // last projectile, link up with first projectile
424 prevproj.queuenext = proj;
425 firstproj.queueprev = proj;
426 proj.queuenext = firstproj;
427 proj.queueprev = prevproj;
429 else { // else link up with previous projectile
430 prevproj.queuenext = proj;
431 proj.queueprev = prevproj;
436 proj.movetype = MOVETYPE_BOUNCEMISSILE;
437 PROJECTILE_MAKETRIGGER(proj);
438 proj.projectiledeathtype = WEP_CRYLINK;
439 //proj.gravity = 0.001;
441 setorigin (proj, w_shotorg);
442 setsize(proj, '0 0 0', '0 0 0');
450 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
454 s = s * autocvar_g_balance_crylink_primary_spread * g_weaponspreadfactor;
455 W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, autocvar_g_balance_crylink_primary_speed, 0, 0, 0, FALSE);
456 proj.touch = W_Crylink_Touch;
458 proj.think = W_Crylink_Fadethink;
461 proj.fade_time = time + autocvar_g_balance_crylink_primary_middle_lifetime;
462 proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_middle_fadetime;
463 proj.nextthink = time + autocvar_g_balance_crylink_primary_middle_lifetime + autocvar_g_balance_crylink_primary_middle_fadetime;
467 proj.fade_time = time + autocvar_g_balance_crylink_primary_other_lifetime;
468 proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_other_fadetime;
469 proj.nextthink = time + autocvar_g_balance_crylink_primary_other_lifetime + autocvar_g_balance_crylink_primary_other_fadetime;
471 proj.teleport_time = time + autocvar_g_balance_crylink_primary_joindelay;
472 proj.cnt = autocvar_g_balance_crylink_primary_bounces;
473 //proj.scale = 1 + 1 * proj.cnt;
475 proj.angles = vectoangles (proj.velocity);
477 //proj.glow_size = 20;
479 proj.flags = FL_PROJECTILE;
481 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
483 other = proj; MUTATOR_CALLHOOK(EditProjectile);
485 counter = counter + 1;
487 self.crylink_lastgroup = proj;
488 W_Crylink_CheckLinks(proj);
491 void W_Crylink_Attack2 (void)
493 local float counter, shots;
494 local entity proj, prevproj, firstproj;
497 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
498 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
500 if(autocvar_g_balance_crylink_reload_ammo)
502 self.clip_load -= autocvar_g_balance_crylink_secondary_ammo;
503 self.crylink_load = self.clip_load;
506 self.ammo_cells -= autocvar_g_balance_crylink_secondary_ammo;
509 maxdmg = autocvar_g_balance_crylink_secondary_damage*autocvar_g_balance_crylink_secondary_shots;
510 maxdmg *= 1 + autocvar_g_balance_crylink_secondary_bouncedamagefactor * autocvar_g_balance_crylink_secondary_bounces;
511 if(autocvar_g_balance_crylink_secondary_joinexplode)
512 maxdmg += autocvar_g_balance_crylink_secondary_joinexplode_damage;
514 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CHAN_WEAPON, maxdmg);
516 shots = autocvar_g_balance_crylink_secondary_shots;
517 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
519 while (counter < shots)
522 proj.realowner = proj.owner = self;
523 proj.classname = "spike";
524 proj.bot_dodge = TRUE;
525 proj.bot_dodgerating = autocvar_g_balance_crylink_secondary_damage;
527 proj.queuenext = proj;
528 proj.queueprev = proj;
530 else if(counter == 0) { // first projectile, store in firstproj for now
533 else if(counter == shots - 1) { // last projectile, link up with first projectile
534 prevproj.queuenext = proj;
535 firstproj.queueprev = proj;
536 proj.queuenext = firstproj;
537 proj.queueprev = prevproj;
539 else { // else link up with previous projectile
540 prevproj.queuenext = proj;
541 proj.queueprev = prevproj;
546 proj.movetype = MOVETYPE_BOUNCEMISSILE;
547 PROJECTILE_MAKETRIGGER(proj);
548 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
549 //proj.gravity = 0.001;
551 setorigin (proj, w_shotorg);
552 setsize(proj, '0 0 0', '0 0 0');
554 W_SetupProjectileVelocityEx(proj, (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * autocvar_g_balance_crylink_secondary_spread * g_weaponspreadfactor), v_up, autocvar_g_balance_crylink_secondary_speed, 0, 0, 0, FALSE);
555 proj.touch = W_Crylink_Touch2;
556 proj.think = W_Crylink_Fadethink;
557 if(counter == (shots - 1) / 2)
559 proj.fade_time = time + autocvar_g_balance_crylink_secondary_middle_lifetime;
560 proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_middle_fadetime;
561 proj.nextthink = time + autocvar_g_balance_crylink_secondary_middle_lifetime + autocvar_g_balance_crylink_secondary_middle_fadetime;
565 proj.fade_time = time + autocvar_g_balance_crylink_secondary_line_lifetime;
566 proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_line_fadetime;
567 proj.nextthink = time + autocvar_g_balance_crylink_secondary_line_lifetime + autocvar_g_balance_crylink_secondary_line_fadetime;
569 proj.teleport_time = time + autocvar_g_balance_crylink_secondary_joindelay;
570 proj.cnt = autocvar_g_balance_crylink_secondary_bounces;
571 //proj.scale = 1 + 1 * proj.cnt;
573 proj.angles = vectoangles (proj.velocity);
575 //proj.glow_size = 20;
577 proj.flags = FL_PROJECTILE;
579 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
581 other = proj; MUTATOR_CALLHOOK(EditProjectile);
583 counter = counter + 1;
585 self.crylink_lastgroup = proj;
588 void spawnfunc_weapon_crylink (void)
590 weapon_defaultspawnfunc(WEP_CRYLINK);
593 float w_crylink(float req)
599 self.BUTTON_ATCK = bot_aim(autocvar_g_balance_crylink_primary_speed, 0, autocvar_g_balance_crylink_primary_middle_lifetime, FALSE);
601 self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_crylink_secondary_speed, 0, autocvar_g_balance_crylink_secondary_middle_lifetime, FALSE);
603 else if (req == WR_THINK)
605 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
607 else if (self.BUTTON_ATCK)
609 if (!self.crylink_waitrelease)
610 if (weapon_prepareattack(0, autocvar_g_balance_crylink_primary_refire))
613 weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_crylink_primary_animtime, w_ready);
614 if(autocvar_g_balance_crylink_primary_joinspread != 0 || autocvar_g_balance_crylink_primary_jointime != 0)
615 self.crylink_waitrelease = 1;
618 else if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
620 if (!self.crylink_waitrelease)
621 if (weapon_prepareattack(1, autocvar_g_balance_crylink_secondary_refire))
624 weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_crylink_secondary_animtime, w_ready);
625 if(autocvar_g_balance_crylink_secondary_joinspread != 0 || autocvar_g_balance_crylink_secondary_jointime != 0)
626 self.crylink_waitrelease = 2;
631 if (self.crylink_waitrelease && (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time))
633 // fired and released now!
634 if(self.crylink_lastgroup)
637 entity linkjoineffect;
639 if(self.crylink_waitrelease == 1)
641 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
646 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_secondary_joinspread * autocvar_g_balance_crylink_secondary_speed, autocvar_g_balance_crylink_secondary_jointime);
649 linkjoineffect = spawn();
650 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
651 linkjoineffect.classname = "linkjoineffect";
652 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
653 linkjoineffect.owner = self;
654 setorigin(linkjoineffect, pos);
656 self.crylink_waitrelease = 0;
657 if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
660 self.cnt = WEP_CRYLINK;
661 self.switchweapon = w_getbestweapon(self);
666 else if (req == WR_PRECACHE)
668 precache_model ("models/weapons/g_crylink.md3");
669 precache_model ("models/weapons/v_crylink.md3");
670 precache_model ("models/weapons/h_crylink.iqm");
671 precache_sound ("weapons/crylink_fire.wav");
672 precache_sound ("weapons/crylink_fire2.wav");
673 precache_sound ("weapons/crylink_linkjoin.wav");
674 precache_sound ("weapons/reload.wav");
676 else if (req == WR_SETUP)
678 weapon_setup(WEP_CRYLINK);
679 W_Crylink_SetAmmoCounter();
681 else if (req == WR_CHECKAMMO1)
683 // don't "run out of ammo" and switch weapons while waiting for release
684 if(self.crylink_lastgroup && self.crylink_waitrelease)
687 ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo;
688 ammo_amount += self.crylink_load >= autocvar_g_balance_crylink_primary_ammo;
691 else if (req == WR_CHECKAMMO2)
693 // don't "run out of ammo" and switch weapons while waiting for release
694 if(self.crylink_lastgroup && self.crylink_waitrelease)
697 ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo;
698 ammo_amount += self.crylink_load >= autocvar_g_balance_crylink_secondary_ammo;
701 else if (req == WR_RESETPLAYER)
703 // all weapons must be fully loaded when we spawn
704 self.crylink_load = autocvar_g_balance_crylink_reload_ammo;
706 else if (req == WR_RELOAD)
714 float w_crylink(float req)
716 if(req == WR_IMPACTEFFECT)
719 org2 = w_org + w_backoff * 2;
720 if(w_deathtype & HITTYPE_SECONDARY)
722 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
724 sound(self, CHAN_PROJECTILE, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
728 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
730 sound(self, CHAN_PROJECTILE, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
733 else if(req == WR_PRECACHE)
735 precache_sound("weapons/crylink_impact2.wav");
736 precache_sound("weapons/crylink_impact.wav");
738 else if (req == WR_SUICIDEMESSAGE)
740 w_deathtypestring = _("%s succeeded at self-destructing themself with the Crylink");
742 else if (req == WR_KILLMESSAGE)
744 if(w_deathtype & HITTYPE_BOUNCE)
745 w_deathtypestring = _("%s could not hide from %s's Crylink"); // unchecked: SPLASH (SECONDARY can't be)
746 else if(w_deathtype & HITTYPE_SPLASH)
747 w_deathtypestring = _("%s was too close to %s's Crylink"); // unchecked: SECONDARY
749 w_deathtypestring = _("%s took a close look at %s's Crylink"); // unchecked: SECONDARY