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)
55 CRYLINK_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
57 .float crylink_waitrelease;
58 .entity crylink_lastgroup;
65 void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
67 void W_Crylink_CheckLinks(entity e)
73 error("W_Crylink_CheckLinks: entity is world");
74 if(e.classname != "spike" || wasfreed(e))
75 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
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;
97 me.classname = "spike_oktoremove";
99 W_Crylink_CheckLinks(next);
102 void W_Crylink_Dequeue(entity e)
104 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
107 void W_Crylink_Reset(void)
109 W_Crylink_Dequeue(self);
113 // force projectile to explode
114 void W_Crylink_LinkExplode (entity e, entity e2)
121 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
123 if(e == e.realowner.crylink_lastgroup)
124 e.realowner.crylink_lastgroup = world;
126 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
128 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);
130 W_Crylink_LinkExplode(e.queuenext, e2);
132 e.classname = "spike_oktoremove";
136 // adjust towards center
137 // returns the origin where they will meet... and the time till the meeting is
138 // stored in w_crylink_linkjoin_time.
139 // could possibly network this origin and time, and display a special particle
140 // effect when projectiles meet there :P
141 // jspeed: joining speed (calculate this as join spread * initial speed)
142 float w_crylink_linkjoin_time;
143 vector W_Crylink_LinkJoin(entity e, float jspeed)
145 vector avg_origin, avg_velocity;
150 // FIXME remove this debug code
151 W_Crylink_CheckLinks(e);
153 w_crylink_linkjoin_time = 0;
155 avg_origin = e.origin;
156 avg_velocity = e.velocity;
158 for(p = e; (p = p.queuenext) != e; )
160 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
161 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
164 avg_origin *= (1.0 / n);
165 avg_velocity *= (1.0 / n);
168 return avg_origin; // nothing to do
170 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
171 avg_dist = pow(vlen(e.origin - avg_origin), 2);
172 for(p = e; (p = p.queuenext) != e; )
173 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
174 avg_dist *= (1.0 / n);
175 avg_dist = sqrt(avg_dist);
178 return avg_origin; // no change needed
182 e.velocity = avg_velocity;
183 UpdateCSQCProjectile(e);
184 for(p = e; (p = p.queuenext) != e; )
186 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
187 UpdateCSQCProjectile(p);
189 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
193 w_crylink_linkjoin_time = avg_dist / jspeed;
194 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
196 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
197 UpdateCSQCProjectile(e);
198 for(p = e; (p = p.queuenext) != e; )
200 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
201 UpdateCSQCProjectile(p);
205 // jspeed -> +infinity:
206 // w_crylink_linkjoin_time -> +0
207 // targ_origin -> avg_origin
208 // p->velocity -> HUEG towards center
210 // w_crylink_linkjoin_time -> +/- infinity
211 // targ_origin -> avg_velocity * +/- infinity
212 // p->velocity -> avg_velocity
213 // jspeed -> -infinity:
214 // w_crylink_linkjoin_time -> -0
215 // targ_origin -> avg_origin
216 // p->velocity -> HUEG away from center
219 W_Crylink_CheckLinks(e);
224 void W_Crylink_LinkJoinEffect_Think()
226 // is there at least 2 projectiles very close?
229 e = self.owner.crylink_lastgroup;
233 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
235 for(p = e; (p = p.queuenext) != e; )
237 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
242 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
244 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
246 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
250 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
251 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
252 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n,
255 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n,
256 e.projectiledeathtype,
259 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
266 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
268 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE);
269 float hit_friendly = 0;
274 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
276 if(SAME_TEAM(head, projectile.realowner))
285 return (hit_enemy ? FALSE : hit_friendly);
288 // NO bounce protection, as bounces are limited!
289 void W_Crylink_Touch (void)
293 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
297 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
299 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
303 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
307 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);
309 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)))))
311 if(self == self.realowner.crylink_lastgroup)
312 self.realowner.crylink_lastgroup = world;
313 W_Crylink_LinkExplode(self.queuenext, self);
314 self.classname = "spike_oktoremove";
321 W_Crylink_Dequeue(self);
325 self.cnt = self.cnt - 1;
326 self.angles = vectoangles(self.velocity);
328 self.projectiledeathtype |= HITTYPE_BOUNCE;
329 // commented out as it causes a little hitch...
331 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
334 void W_Crylink_Fadethink (void)
336 W_Crylink_Dequeue(self);
340 void W_Crylink_Attack (void)
342 float counter, shots;
343 entity proj, prevproj, firstproj;
345 vector forward, right, up;
348 W_DecreaseAmmo(WEP_CVAR_PRI(crylink, ammo));
350 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
351 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
352 if(WEP_CVAR_PRI(crylink, joinexplode))
353 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
355 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg);
360 shots = WEP_CVAR_PRI(crylink, shots);
361 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
362 proj = prevproj = firstproj = world;
363 for(counter = 0; counter < shots; ++counter)
366 proj.reset = W_Crylink_Reset;
367 proj.realowner = proj.owner = self;
368 proj.classname = "spike";
369 proj.bot_dodge = TRUE;
370 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
372 proj.queuenext = proj;
373 proj.queueprev = proj;
375 else if(counter == 0) { // first projectile, store in firstproj for now
378 else if(counter == shots - 1) { // last projectile, link up with first projectile
379 prevproj.queuenext = proj;
380 firstproj.queueprev = proj;
381 proj.queuenext = firstproj;
382 proj.queueprev = prevproj;
384 else { // else link up with previous projectile
385 prevproj.queuenext = proj;
386 proj.queueprev = prevproj;
391 proj.movetype = MOVETYPE_BOUNCEMISSILE;
392 PROJECTILE_MAKETRIGGER(proj);
393 proj.projectiledeathtype = WEP_CRYLINK;
394 //proj.gravity = 0.001;
396 setorigin (proj, w_shotorg);
397 setsize(proj, '0 0 0', '0 0 0');
405 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
409 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
410 W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s_y + up * s_z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE);
411 proj.touch = W_Crylink_Touch;
413 proj.think = W_Crylink_Fadethink;
416 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
417 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
418 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
422 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
423 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
424 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
426 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
427 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
428 //proj.scale = 1 + 1 * proj.cnt;
430 proj.angles = vectoangles (proj.velocity);
432 //proj.glow_size = 20;
434 proj.flags = FL_PROJECTILE;
435 proj.missile_flags = MIF_SPLASH;
437 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
439 other = proj; MUTATOR_CALLHOOK(EditProjectile);
441 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
443 self.crylink_lastgroup = proj;
444 W_Crylink_CheckLinks(proj);
445 self.crylink_waitrelease = 1;
449 void W_Crylink_Attack2 (void)
451 float counter, shots;
452 entity proj, prevproj, firstproj;
454 vector forward, right, up;
457 W_DecreaseAmmo(WEP_CVAR_SEC(crylink, ammo));
459 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
460 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
461 if(WEP_CVAR_SEC(crylink, joinexplode))
462 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
464 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg);
469 shots = WEP_CVAR_SEC(crylink, shots);
470 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
471 proj = prevproj = firstproj = world;
472 for(counter = 0; counter < shots; ++counter)
475 proj.reset = W_Crylink_Reset;
476 proj.realowner = proj.owner = self;
477 proj.classname = "spike";
478 proj.bot_dodge = TRUE;
479 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
481 proj.queuenext = proj;
482 proj.queueprev = proj;
484 else if(counter == 0) { // first projectile, store in firstproj for now
487 else if(counter == shots - 1) { // last projectile, link up with first projectile
488 prevproj.queuenext = proj;
489 firstproj.queueprev = proj;
490 proj.queuenext = firstproj;
491 proj.queueprev = prevproj;
493 else { // else link up with previous projectile
494 prevproj.queuenext = proj;
495 proj.queueprev = prevproj;
500 proj.movetype = MOVETYPE_BOUNCEMISSILE;
501 PROJECTILE_MAKETRIGGER(proj);
502 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
503 //proj.gravity = 0.001;
505 setorigin (proj, w_shotorg);
506 setsize(proj, '0 0 0', '0 0 0');
508 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
515 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
519 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
520 s = w_shotdir + right * s_y + up * s_z;
524 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
527 W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE);
528 proj.touch = W_Crylink_Touch;
529 proj.think = W_Crylink_Fadethink;
530 if(counter == (shots - 1) / 2)
532 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
533 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
534 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
538 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
539 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
540 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
542 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
543 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
544 //proj.scale = 1 + 1 * proj.cnt;
546 proj.angles = vectoangles (proj.velocity);
548 //proj.glow_size = 20;
550 proj.flags = FL_PROJECTILE;
551 proj.missile_flags = MIF_SPLASH;
553 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
555 other = proj; MUTATOR_CALLHOOK(EditProjectile);
557 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
559 self.crylink_lastgroup = proj;
560 W_Crylink_CheckLinks(proj);
561 self.crylink_waitrelease = 2;
565 float W_Crylink(float req)
573 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE);
575 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE);
581 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) // forced reload
582 WEP_ACTION(self.weapon, WR_RELOAD);
584 if (self.BUTTON_ATCK)
586 if (self.crylink_waitrelease != 1)
587 if (weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
590 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
594 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
596 if (self.crylink_waitrelease != 2)
597 if (weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
600 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
604 if ((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
606 if (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
608 // fired and released now!
609 if(self.crylink_lastgroup)
612 entity linkjoineffect;
613 float isprimary = (self.crylink_waitrelease == 1);
615 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
617 linkjoineffect = spawn();
618 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
619 linkjoineffect.classname = "linkjoineffect";
620 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
621 linkjoineffect.owner = self;
622 setorigin(linkjoineffect, pos);
624 self.crylink_waitrelease = 0;
625 if(!W_Crylink(WR_CHECKAMMO1) && !W_Crylink(WR_CHECKAMMO2))
626 if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
629 self.cnt = WEP_CRYLINK;
630 self.switchweapon = w_getbestweapon(self);
639 precache_model ("models/weapons/g_crylink.md3");
640 precache_model ("models/weapons/v_crylink.md3");
641 precache_model ("models/weapons/h_crylink.iqm");
642 precache_sound ("weapons/crylink_fire.wav");
643 precache_sound ("weapons/crylink_fire2.wav");
644 precache_sound ("weapons/crylink_linkjoin.wav");
645 CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
650 // don't "run out of ammo" and switch weapons while waiting for release
651 if(self.crylink_lastgroup && self.crylink_waitrelease)
654 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
655 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo);
660 // don't "run out of ammo" and switch weapons while waiting for release
661 if(self.crylink_lastgroup && self.crylink_waitrelease)
664 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
665 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo);
670 CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
675 W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), "weapons/reload.wav");
678 case WR_SUICIDEMESSAGE:
680 return WEAPON_CRYLINK_SUICIDE;
684 return WEAPON_CRYLINK_MURDER;
691 float W_Crylink(float req)
695 case WR_IMPACTEFFECT:
698 org2 = w_org + w_backoff * 2;
699 if(w_deathtype & HITTYPE_SECONDARY)
701 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
703 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
707 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
709 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
716 precache_sound("weapons/crylink_impact2.wav");
717 precache_sound("weapons/crylink_impact.wav");
722 // no weapon specific image for this weapon