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