]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/w_seeker.qc
Move weapon load floats in defs.qh, rather than in each weapon file. Necessary to...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_seeker.qc
1 #ifdef REGISTER_WEAPON
2 REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", _("T.A.G. Seeker"))
3 #else
4 #ifdef SVQC
5 //.float proxytime; = autoswitch
6 //.float tl; = wait
7
8 void W_Seeker_SetAmmoCounter()
9 {
10         // set clip_load to the weapon we have switched to, if the gun uses reloading
11         if(!autocvar_g_balance_seeker_reload_ammo)
12                 self.clip_load = 0; // also keeps crosshair ammo from displaying
13         else
14         {
15                 self.clip_load = self.seeker_load;
16                 self.clip_size = autocvar_g_balance_seeker_reload_ammo; // for the crosshair ammo display
17         }
18 }
19
20 void W_Seeker_ReloadedAndReady()
21 {
22         float t;
23
24         // now do the ammo transfer
25         self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
26         while(self.clip_load < autocvar_g_balance_seeker_reload_ammo && self.ammo_rockets) // make sure we don't add more ammo than we have
27         {
28                 self.clip_load += 1;
29                 self.ammo_rockets -= 1;
30         }
31         self.seeker_load = self.clip_load;
32
33         t = ATTACK_FINISHED(self) - autocvar_g_balance_seeker_reload_time - 1;
34         ATTACK_FINISHED(self) = t;
35         w_ready();
36 }
37
38 void W_Seeker_Reload()
39 {
40         // return if reloading is disabled for this weapon
41         if(!autocvar_g_balance_seeker_reload_ammo)
42                 return;
43
44         if(!W_ReloadCheck(self.ammo_rockets, min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo)))
45                 return;
46
47         float t;
48
49         sound (self, CHAN_WEAPON2, "weapons/reload.wav", VOL_BASE, ATTN_NORM);
50
51         t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_seeker_reload_time + 1;
52         ATTACK_FINISHED(self) = t;
53
54         weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_seeker_reload_time, W_Seeker_ReloadedAndReady);
55
56         self.old_clip_load = self.clip_load;
57         self.clip_load = -1;
58 }
59
60 void Seeker_Missile_Explode ()
61 {
62         self.event_damage = SUB_Null;
63         RadiusDamage (self, self.owner, autocvar_g_balance_seeker_missile_damage, autocvar_g_balance_seeker_missile_edgedamage, autocvar_g_balance_seeker_missile_radius, world, autocvar_g_balance_seeker_missile_force, self.projectiledeathtype, other);
64
65         remove (self);
66 }
67
68 void Seeker_Missile_Touch()
69 {
70         PROJECTILE_TOUCH;
71
72         Seeker_Missile_Explode();
73 }
74
75 void Seeker_Missile_Think()
76 {
77         entity e;
78         vector desireddir, olddir, newdir, eorg;
79         float turnrate;
80         float dist;
81         float spd;
82
83         if (time > self.cnt)
84         {
85                 self.projectiledeathtype |= HITTYPE_SPLASH;
86                 Seeker_Missile_Explode();
87         }
88
89         spd = vlen(self.velocity);
90         spd = bound(
91                 spd - autocvar_g_balance_seeker_missile_decel * frametime,
92                 autocvar_g_balance_seeker_missile_speed_max,
93                 spd + autocvar_g_balance_seeker_missile_accel * frametime
94         );
95
96         if (self.enemy != world)
97                 if (self.enemy.takedamage != DAMAGE_AIM || self.enemy.deadflag != DEAD_NO)
98                         self.enemy = world;
99
100         if (self.enemy != world)
101         {
102                 e               = self.enemy;
103                 eorg            = 0.5 * (e.absmin + e.absmax);
104                 turnrate        = autocvar_g_balance_seeker_missile_turnrate; // how fast to turn
105                 desireddir      = normalize(eorg - self.origin);
106                 olddir          = normalize(self.velocity); // get my current direction
107                 dist            = vlen(eorg - self.origin);
108
109                 // Do evasive maneuvers for world objects? ( this should be a cpu hog. :P )
110                 if (autocvar_g_balance_seeker_missile_smart && (dist > autocvar_g_balance_seeker_missile_smart_mindist))
111                 {
112                         // Is it a better idea (shorter distance) to trace to the target itself?
113                         if ( vlen(self.origin + olddir * self.wait) < dist)
114                                 traceline(self.origin, self.origin + olddir * self.wait, FALSE, self);
115                         else
116                                 traceline(self.origin, eorg, FALSE, self);
117
118                         // Setup adaptive tracelength
119                         self.wait = bound(autocvar_g_balance_seeker_missile_smart_trace_min, vlen(self.origin - trace_endpos), self.wait = autocvar_g_balance_seeker_missile_smart_trace_max);
120
121                         // Calc how important it is that we turn and add this to the desierd (enemy) dir.
122                         desireddir  = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
123                 }
124                 
125                 newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
126                 self.velocity = newdir * spd; // make me fly in the new direction at my flight speed
127         }
128
129         // Proxy
130         if (autocvar_g_balance_seeker_missile_proxy)
131         {
132                 if ( dist <= autocvar_g_balance_seeker_missile_proxy_maxrange)
133                 {
134                         if (self.autoswitch == 0)
135                         {
136                                 self.autoswitch = time + autocvar_g_balance_seeker_missile_proxy_delay;
137                         }
138                         else
139                         {
140                                 if (self.autoswitch <= time)
141                                 {
142                                         Seeker_Missile_Explode();
143                                         self.autoswitch = 0;
144                                 }
145                         }
146                 }
147                 else
148                 {
149                         if (self.autoswitch != 0)
150                                 self.autoswitch = 0;
151                 }
152         }
153         ///////////////
154
155         if (self.enemy.deadflag != DEAD_NO)
156         {
157                 self.enemy = world;
158                 self.cnt = time + 1 + (random() * 4);
159                 self.nextthink = self.cnt;
160                 return;
161         }
162
163         //self.angles = vectoangles(self.velocity);                     // turn model in the new flight direction
164         self.nextthink = time;// + 0.05; // csqc projectiles
165         UpdateCSQCProjectile(self);
166 }
167
168
169
170 void Seeker_Missile_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
171 {
172         if (self.health <= 0)
173                 return;
174
175         if (self.owner == attacker)
176                 self.health = self.health - (damage * 0.25);
177         else
178                 self.health = self.health - damage;
179                 
180         if (self.health <= 0)
181                 W_PrepareExplosionByDamage(attacker, Seeker_Missile_Explode);
182 }
183
184 /*
185 void Seeker_Missile_Animate()
186 {
187         self.frame = self.frame +1;
188         self.nextthink = time + 0.05;
189
190         if (self.enemy != world)
191                 if (self.enemy.takedamage != DAMAGE_AIM || self.enemy.deadflag != DEAD_NO)
192                         self.enemy = world;
193
194         if(self.frame == 5)
195         {
196                 self.think           = Seeker_Missile_Think;
197                 self.nextthink       = time;// + cvar("g_balance_seeker_missile_activate_delay"); // cant dealy with csqc projectiles
198
199                 if (autocvar_g_balance_seeker_missile_proxy)
200                         self.movetype    = MOVETYPE_BOUNCEMISSILE;
201                 else
202                         self.movetype    = MOVETYPE_FLYMISSILE;
203         }
204
205         UpdateCSQCProjectile(self);
206 }
207 */
208
209 void Seeker_Fire_Missile(vector f_diff)
210 {
211         local entity missile;
212
213         // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
214         if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
215         {
216                 if(autocvar_g_balance_seeker_reload_ammo)
217                 {
218                         self.clip_load -= autocvar_g_balance_seeker_missile_ammo;
219                         self.seeker_load = self.clip_load;
220                 }
221                 else
222                         self.ammo_rockets -= autocvar_g_balance_seeker_missile_ammo;
223         }
224
225         makevectors(self.v_angle);
226         W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CHAN_WEAPON, 0);
227         w_shotorg += f_diff;
228         pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
229
230         //self.detornator         = FALSE;
231
232         missile                 = spawn();
233         missile.owner           = self;
234         missile.classname       = "seeker_missile";
235         missile.bot_dodge       = TRUE;
236         missile.bot_dodgerating = autocvar_g_balance_seeker_missile_damage;
237
238         missile.think           = Seeker_Missile_Think;
239         missile.touch           = Seeker_Missile_Touch;
240         missile.event_damage    = Seeker_Missile_Damage;
241         missile.nextthink       = time;// + 0.2;// + cvar("g_balance_seeker_missile_activate_delay");
242         missile.cnt             = time + autocvar_g_balance_seeker_missile_lifetime;
243         missile.enemy           = self.enemy;
244         missile.solid           = SOLID_BBOX;
245         missile.scale           = 2;
246         missile.takedamage      = DAMAGE_YES;
247         missile.health          = autocvar_g_balance_seeker_missile_health;
248         missile.damageforcescale = autocvar_g_balance_seeker_missile_damageforcescale;
249         missile.projectiledeathtype = WEP_SEEKER;
250         //missile.think           = Seeker_Missile_Animate; // csqc projectiles.
251
252
253         setorigin (missile, w_shotorg);
254         setsize (missile, '-4 -4 -4', '4 4 4');
255         missile.movetype    = MOVETYPE_FLYMISSILE;
256         missile.flags       = FL_PROJECTILE;
257         W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_missile);
258
259         missile.angles = vectoangles (missile.velocity);
260
261         CSQCProjectile(missile, FALSE, PROJECTILE_SEEKER, TRUE);
262
263         other = missile; MUTATOR_CALLHOOK(EditProjectile);
264 }
265
266 void Seeker_Vollycontroler_Think()
267 {
268         float c;
269         entity oldself,oldenemy;
270         self.cnt = self.cnt - 1;
271
272         if((!(self.owner.items & IT_UNLIMITED_AMMO) && self.owner.ammo_rockets < autocvar_g_balance_seeker_missile_ammo) || (self.cnt <= -1) || (self.owner.deadflag != DEAD_NO) || (self.owner.switchweapon != WEP_SEEKER))
273         {
274                 remove(self);
275                 return;
276         }
277
278         self.nextthink = time + autocvar_g_balance_seeker_missile_delay;
279
280         oldself = self;
281         self = self.owner;
282
283         oldenemy = self.enemy;
284         self.enemy = oldself.enemy;
285
286         c = mod(oldself.cnt, 4);
287         switch(c)
288         {
289                 case 0:
290                         Seeker_Fire_Missile('-1.25 -3.75 0');
291                         break;
292                 case 1:
293                         Seeker_Fire_Missile('+1.25 -3.75 0');
294                         break;
295                 case 2:
296                         Seeker_Fire_Missile('-1.25 +3.75 0');
297                         break;
298                 case 3:
299                 default:
300                         Seeker_Fire_Missile('+1.25 +3.75 0');
301                         break;
302         }
303
304         self.enemy = oldenemy;
305         self = oldself;
306 }
307
308 void Seeker_Tag_Explode ()
309 {
310         //if(other==self.owner)
311         //    return;
312         Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE, self);
313
314         remove (self);
315 }
316
317 void Seeker_Tag_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
318 {
319         if (self.health <= 0)
320                 return;
321         self.health = self.health - damage;
322         if (self.health <= 0)
323                 Seeker_Tag_Explode();
324 }
325
326
327 void Seeker_Tag_Touch()
328 {
329         vector dir;
330         vector org2;
331         entity e;
332         
333         dir     = normalize (self.owner.origin - self.origin);
334         org2    = findbetterlocation (self.origin, 8);
335
336         te_knightspike(org2);
337
338         self.event_damage = SUB_Null;
339         Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, self);
340
341         if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO)
342         {               
343                 e           = spawn();
344                 e.cnt       = autocvar_g_balance_seeker_missile_count;
345                 e.owner     = self.owner;
346                 e.enemy     = other;
347                 e.think     = Seeker_Vollycontroler_Think;
348                 e.nextthink = time;
349         }
350
351         remove(self);
352         return;
353 }
354
355 void Seeker_Fire_Tag()
356 {
357         local entity missile;
358         // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
359         if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
360         {
361                 if(autocvar_g_balance_seeker_reload_ammo)
362                 {
363                         self.clip_load -= autocvar_g_balance_seeker_tag_ammo;
364                         self.seeker_load = self.clip_load;
365                 }
366                 else
367                         self.ammo_rockets -= autocvar_g_balance_seeker_tag_ammo;
368         }
369
370         W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CHAN_WEAPON, autocvar_g_balance_seeker_missile_damage * autocvar_g_balance_seeker_missile_count);
371
372         missile                 = spawn();
373         missile.owner           = self;
374         missile.classname       = "seeker_tag";
375         missile.bot_dodge       = TRUE;
376         missile.bot_dodgerating = 50;
377         missile.touch           = Seeker_Tag_Touch;
378         missile.think           = SUB_Remove;
379         missile.nextthink       = time + autocvar_g_balance_seeker_tag_lifetime;
380         missile.movetype        = MOVETYPE_FLY;
381         missile.solid           = SOLID_BBOX;
382         missile.owner           = self;
383
384         missile.takedamage       = DAMAGE_YES;
385         missile.event_damage    = Seeker_Tag_Explode;
386         missile.health          = autocvar_g_balance_seeker_tag_health;
387         missile.damageforcescale = autocvar_g_balance_seeker_tag_damageforcescale;
388
389         setorigin (missile, w_shotorg);
390         setsize (missile, '-2 -2 -2', '2 2 2');
391
392         missile.flags       = FL_PROJECTILE;
393
394         missile.movetype    = MOVETYPE_FLY;
395         W_SETUPPROJECTILEVELOCITY(missile, g_balance_seeker_tag);
396         missile.angles = vectoangles (missile.velocity);
397
398         CSQCProjectile(missile, TRUE, PROJECTILE_TAG, FALSE); // has sound
399
400         other = missile; MUTATOR_CALLHOOK(EditProjectile);
401 }
402
403
404 void Seeker_Flac_Explode ()
405 {
406         self.event_damage = SUB_Null;
407
408         RadiusDamage (self, self.owner, autocvar_g_balance_seeker_flac_damage, autocvar_g_balance_seeker_flac_edgedamage, autocvar_g_balance_seeker_flac_radius, world, autocvar_g_balance_seeker_flac_force, self.projectiledeathtype, other);
409
410         remove (self);
411 }
412
413 void Seeker_Flac_Touch()
414 {
415         PROJECTILE_TOUCH;
416
417         Seeker_Flac_Explode();
418 }
419
420 void Seeker_Fire_Flac()
421 {
422         local entity missile;
423         vector f_diff;
424         float c;
425
426         // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
427         if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
428         {
429                 if(autocvar_g_balance_seeker_reload_ammo)
430                 {
431                         self.clip_load -= autocvar_g_balance_seeker_flac_ammo;
432                         self.seeker_load = self.clip_load;
433                 }
434                 else
435                         self.ammo_rockets -= autocvar_g_balance_seeker_flac_ammo;
436         }
437
438         c = mod(self.bulletcounter, 4);
439         switch(c)
440         {
441                 case 0:
442                         f_diff = '-1.25 -3.75 0';
443                         break;
444                 case 1:
445                         f_diff = '+1.25 -3.75 0';
446                         break;
447                 case 2:
448                         f_diff = '-1.25 +3.75 0';
449                         break;
450                 case 3:
451                 default:
452                         f_diff = '+1.25 +3.75 0';
453                         break;
454         }
455         W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", CHAN_WEAPON, autocvar_g_balance_seeker_flac_damage);
456         w_shotorg += f_diff;
457
458         pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
459
460         missile                                 = spawn ();
461         missile.owner                   = missile.realowner = self;
462         missile.classname               = "missile";
463         missile.bot_dodge               = TRUE;
464         missile.bot_dodgerating = autocvar_g_balance_seeker_flac_damage;
465         missile.touch                   = Seeker_Flac_Explode;
466         missile.use                     = Seeker_Flac_Explode; 
467         missile.think                   = adaptor_think2use_hittype_splash;
468         missile.nextthink               = time + autocvar_g_balance_seeker_flac_lifetime + autocvar_g_balance_seeker_flac_lifetime_rand;
469         missile.solid                   = SOLID_BBOX;
470         missile.movetype                = MOVETYPE_FLY; 
471         missile.projectiledeathtype = WEP_SEEKER;
472         missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
473         missile.flags                           = FL_PROJECTILE;
474         
475         // csqc projectiles
476         //missile.angles                                = vectoangles (missile.velocity);       
477         //missile.scale = 0.4; // BUG: the model is too big 
478         
479         setorigin (missile, w_shotorg);
480         setsize (missile, '-2 -2 -2', '2 2 2');
481                 
482         W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_flac);
483         CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
484
485         other = missile; MUTATOR_CALLHOOK(EditProjectile);
486 }
487
488 void spawnfunc_weapon_seeker (void)
489 {
490         weapon_defaultspawnfunc(WEP_SEEKER);
491 }
492
493 float w_seeker(float req)
494 {
495         if (req == WR_AIM)
496                 self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_tag_speed, 0, 20, FALSE);
497
498         else if (req == WR_THINK)
499         {
500                 if(autocvar_g_balance_seeker_reload_ammo && self.clip_load < min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo)) // forced reload
501                         W_Seeker_Reload();
502
503                 else if (self.BUTTON_ATCK)
504                 {
505                         if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
506                         {
507                                 Seeker_Fire_Tag();
508                                 weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_seeker_tag_animtime, w_ready);
509                         }
510                 }
511
512                 else if (self.BUTTON_ATCK2)
513                 {
514                         if (weapon_prepareattack(1, autocvar_g_balance_seeker_flac_refire))
515                         {
516                                 Seeker_Fire_Flac();
517                                 weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_flac_animtime, w_ready);
518                         }
519                 }
520
521         if(self.wish_reload)
522         {
523             if(self.switchweapon == self.weapon)
524             {
525                 if(self.weaponentity.state == WS_READY)
526                 {
527                     self.wish_reload = 0;
528                     W_Seeker_Reload();
529                 }
530             }
531         }
532         }
533         else if (req == WR_PRECACHE)
534         {
535                 precache_model ("models/weapons/g_seeker.md3");
536                 precache_model ("models/weapons/v_seeker.md3");
537                 precache_model ("models/weapons/h_seeker.iqm");
538                 precache_sound ("weapons/tag_fire.wav");
539                 precache_sound ("weapons/flac_fire.wav");
540                 precache_sound ("weapons/seeker_fire.wav");
541                 precache_sound ("weapons/reload.wav");
542         }
543         else if (req == WR_SETUP)
544         {
545                 weapon_setup(WEP_SEEKER);
546                 W_Seeker_SetAmmoCounter();
547         }
548         else if (req == WR_CHECKAMMO1)
549         {
550                 if(autocvar_g_balance_seeker_reload_ammo)
551                         return self.clip_load >= autocvar_g_balance_seeker_tag_ammo + autocvar_g_balance_seeker_missile_ammo;
552                 else
553                         return self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo + autocvar_g_balance_seeker_missile_ammo;
554         }
555         else if (req == WR_CHECKAMMO2)
556         {
557                 if(autocvar_g_balance_seeker_reload_ammo)
558                         return self.clip_load >= autocvar_g_balance_seeker_flac_ammo;
559                 else
560                         return self.ammo_rockets >= autocvar_g_balance_seeker_flac_ammo;
561         }
562         else if (req == WR_RELOAD)
563         {
564                 W_Seeker_Reload();
565         }
566         return TRUE;
567 };
568 #endif
569 #ifdef CSQC
570 float w_seeker(float req)
571 {
572         if(req == WR_IMPACTEFFECT)
573         {
574                 vector org2;
575                 org2 = w_org + w_backoff * 6;
576                 if(w_deathtype & HITTYPE_SECONDARY)
577                 {
578                         pointparticles(particleeffectnum("flac_explode"), org2, '0 0 0', 1);
579                         if(!w_issilent)
580                         {
581                                 if (w_random<0.15)
582                                         sound(self, CHAN_PROJECTILE, "weapons/flacexp1.wav", 1, ATTN_NORM);
583                                 else if (w_random<0.7)
584                                         sound(self, CHAN_PROJECTILE, "weapons/flacexp2.wav", 1, ATTN_NORM);
585                                 else
586                                         sound(self, CHAN_PROJECTILE, "weapons/flacexp3.wav", 1, ATTN_NORM);
587                         }
588                 }
589                 else
590                 {
591                         if(w_deathtype & HITTYPE_BOUNCE)
592                         {
593                                 pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
594                                 if(!w_issilent)
595                                 {
596                                         if (w_random<0.15)
597                                                 sound(self, CHAN_PROJECTILE, "weapons/tagexp1.wav", 1, ATTN_NORM);
598                                         else if (w_random<0.7)
599                                                 sound(self, CHAN_PROJECTILE, "weapons/tagexp2.wav", 1, ATTN_NORM);
600                                         else
601                                                 sound(self, CHAN_PROJECTILE, "weapons/tagexp3.wav", 1, ATTN_NORM);
602                                 }
603                         }
604                         else if(w_deathtype & HITTYPE_HEADSHOT)
605                         {
606                                 if(!w_issilent)
607                                         sound(self, CHAN_PROJECTILE, "weapons/tag_impact.wav", 1, ATTN_NORM);
608                         }
609                         else
610                         {
611                                 pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
612                                 if(!w_issilent)
613                                 {
614                                         if (w_random<0.15)
615                                                 sound(self, CHAN_PROJECTILE, "weapons/seekerexp1.wav", 1, ATTN_NORM);
616                                         else if (w_random<0.7)
617                                                 sound(self, CHAN_PROJECTILE, "weapons/seekerexp2.wav", 1, ATTN_NORM);
618                                         else
619                                                 sound(self, CHAN_PROJECTILE, "weapons/seekerexp3.wav", 1, ATTN_NORM);
620                                 }
621                         }
622                 }
623         }
624         else if(req == WR_PRECACHE)
625         {
626                 precache_sound("weapons/flacexp1.wav");
627                 precache_sound("weapons/flacexp2.wav");
628                 precache_sound("weapons/flacexp3.wav");
629                 precache_sound("weapons/seekerexp1.wav");
630                 precache_sound("weapons/seekerexp2.wav");
631                 precache_sound("weapons/seekerexp3.wav");
632                 precache_sound("weapons/tagexp1.wav");
633                 precache_sound("weapons/tagexp2.wav");
634                 precache_sound("weapons/tagexp3.wav");
635                 precache_sound("weapons/tag_impact.wav");
636         }
637         else if (req == WR_SUICIDEMESSAGE)
638                 w_deathtypestring = "%s played with tiny rockets";
639         else if (req == WR_KILLMESSAGE)
640         {
641                 if(w_deathtype & HITTYPE_SECONDARY)
642                         w_deathtypestring = "%s ran into %s's flac";
643                 else
644                         w_deathtypestring = "%s was tagged by %s";
645         }
646         return TRUE;
647 }
648 #endif
649 #endif