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