]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/weapons/w_electro.qc
Rename AMMO_vAL to WEP_AMMO
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_electro.qc
1 #ifdef REGISTER_WEAPON
2 REGISTER_WEAPON(
3 /* WEP_##id */ ELECTRO,
4 /* function */ W_Electro,
5 /* ammotype */ ammo_cells,
6 /* impulse  */ 5,
7 /* flags    */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
8 /* rating   */ BOT_PICKUP_RATING_MID,
9 /* color        */ '0 0.5 1',
10 /* model    */ "electro",
11 /* netname  */ "electro",
12 /* fullname */ _("Electro")
13 );
14
15 #define ELECTRO_SETTINGS(w_cvar,w_prop) ELECTRO_SETTINGS_LIST(w_cvar, w_prop, ELECTRO, electro)
16 #define ELECTRO_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
17         w_cvar(id, sn, BOTH, ammo) \
18         w_cvar(id, sn, BOTH, animtime) \
19         w_cvar(id, sn, BOTH, damage) \
20         w_cvar(id, sn, BOTH, edgedamage) \
21         w_cvar(id, sn, BOTH, force) \
22         w_cvar(id, sn, BOTH, radius) \
23         w_cvar(id, sn, BOTH, refire) \
24         w_cvar(id, sn, BOTH, speed) \
25         w_cvar(id, sn, BOTH, spread) \
26         w_cvar(id, sn, BOTH, lifetime) \
27         w_cvar(id, sn, PRI,  comboradius) \
28         w_cvar(id, sn, PRI,  midaircombo_explode) \
29         w_cvar(id, sn, PRI,  midaircombo_interval) \
30         w_cvar(id, sn, PRI,  midaircombo_radius) \
31         w_cvar(id, sn, SEC,  bouncefactor) \
32         w_cvar(id, sn, SEC,  bouncestop) \
33         w_cvar(id, sn, SEC,  count) \
34         w_cvar(id, sn, SEC,  damageforcescale) \
35         w_cvar(id, sn, SEC,  damagedbycontents) \
36         w_cvar(id, sn, SEC,  health) \
37         w_cvar(id, sn, SEC,  refire2) \
38         w_cvar(id, sn, SEC,  speed_up) \
39         w_cvar(id, sn, SEC,  speed_z) \
40         w_cvar(id, sn, SEC,  touchexplode) \
41         w_cvar(id, sn, NONE, combo_comboradius) \
42         w_cvar(id, sn, NONE, combo_comboradius_thruwall) \
43         w_cvar(id, sn, NONE, combo_damage) \
44         w_cvar(id, sn, NONE, combo_edgedamage) \
45         w_cvar(id, sn, NONE, combo_force) \
46         w_cvar(id, sn, NONE, combo_radius) \
47         w_cvar(id, sn, NONE, combo_speed) \
48         w_cvar(id, sn, NONE, combo_safeammocheck) \
49         w_prop(id, sn, float,  reloading_ammo, reload_ammo) \
50         w_prop(id, sn, float,  reloading_time, reload_time) \
51         w_prop(id, sn, float,  switchdelay_raise, switchdelay_raise) \
52         w_prop(id, sn, float,  switchdelay_drop, switchdelay_drop) \
53         w_prop(id, sn, string, weaponreplace, weaponreplace) \
54         w_prop(id, sn, float,  weaponstart, weaponstart) \
55         w_prop(id, sn, float,  weaponstartoverride, weaponstartoverride)
56
57 #ifdef SVQC
58 ELECTRO_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
59 .float electro_count;
60 .float electro_secondarytime;
61 void W_Electro_ExplodeCombo(void);
62 #endif
63 #else
64 #ifdef SVQC
65 void spawnfunc_weapon_electro() { weapon_defaultspawnfunc(WEP_ELECTRO); }
66
67 void W_Electro_TriggerCombo(vector org, float rad, entity own)
68 {
69         entity e = WarpZone_FindRadius(org, rad, !WEP_CVAR(electro, combo_comboradius_thruwall));
70         while(e)
71         {
72                 if(e.classname == "electro_orb")
73                 {
74                         // do we allow thruwall triggering?
75                         if(WEP_CVAR(electro, combo_comboradius_thruwall))
76                         {
77                                 // if distance is greater than thruwall distance, check to make sure it's not through a wall
78                                 if(vlen(e.WarpZone_findradius_dist) > WEP_CVAR(electro, combo_comboradius_thruwall))
79                                 {
80                                         WarpZone_TraceLine(org, e.origin, MOVE_NOMONSTERS, e);
81                                         if(trace_fraction != 1)
82                                         {
83                                                 // trigger is through a wall and outside of thruwall range, abort
84                                                 e = e.chain;
85                                                 continue;
86                                         }
87                                 }
88                         }
89                         
90                         // change owner to whoever caused the combo explosion
91                         e.realowner = own;
92                         e.takedamage = DAMAGE_NO;
93                         e.classname = "electro_orb_chain";
94                         
95                         // now set the next one to trigger as well
96                         e.think = W_Electro_ExplodeCombo;
97                         
98                         // delay combo chains, looks cooler
99                         e.nextthink =
100                                 (
101                                         time
102                                         +
103                                         (WEP_CVAR(electro, combo_speed) ?
104                                                 (vlen(e.WarpZone_findradius_dist) / WEP_CVAR(electro, combo_speed))
105                                                 :
106                                                 0
107                                         )
108                                 );
109                 }
110                 e = e.chain;
111         }
112 }
113
114 void W_Electro_ExplodeCombo(void)
115 {
116         W_Electro_TriggerCombo(self.origin, WEP_CVAR(electro, combo_comboradius), self.realowner);
117
118         self.event_damage = func_null;
119         
120         RadiusDamage(
121                 self,
122                 self.realowner,
123                 WEP_CVAR(electro, combo_damage),
124                 WEP_CVAR(electro, combo_edgedamage),
125                 WEP_CVAR(electro, combo_radius),
126                 world,
127                 world,
128                 WEP_CVAR(electro, combo_force),
129                 WEP_ELECTRO | HITTYPE_BOUNCE, // use THIS type for a combo because primary can't bounce
130                 world
131         );
132
133         remove(self);
134 }
135
136 void W_Electro_Explode(void)
137 {
138         if(other.takedamage == DAMAGE_AIM)
139                 if(IS_PLAYER(other))
140                         if(DIFF_TEAM(self.realowner, other))
141                                 if(other.deadflag == DEAD_NO)
142                                         if(IsFlying(other))
143                                                 Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
144
145         self.event_damage = func_null;
146         self.takedamage = DAMAGE_NO;
147         
148         if(self.movetype == MOVETYPE_BOUNCE)
149         {
150                 RadiusDamage(
151                         self,
152                         self.realowner,
153                         WEP_CVAR_SEC(electro, damage),
154                         WEP_CVAR_SEC(electro, edgedamage),
155                         WEP_CVAR_SEC(electro, radius),
156                         world,
157                         world,
158                         WEP_CVAR_SEC(electro, force),
159                         self.projectiledeathtype,
160                         other
161                 );
162         }
163         else
164         {
165                 W_Electro_TriggerCombo(self.origin, WEP_CVAR_PRI(electro, comboradius), self.realowner);
166                 RadiusDamage(
167                         self,
168                         self.realowner,
169                         WEP_CVAR_PRI(electro, damage),
170                         WEP_CVAR_PRI(electro, edgedamage),
171                         WEP_CVAR_PRI(electro, radius),
172                         world,
173                         world,
174                         WEP_CVAR_PRI(electro, force),
175                         self.projectiledeathtype,
176                         other
177                 );
178         }
179
180         remove(self);
181 }
182
183 void W_Electro_TouchExplode(void)
184 {
185         PROJECTILE_TOUCH;
186         W_Electro_Explode();
187 }
188
189 void W_Electro_Bolt_Think()
190 {
191         if(time >= self.ltime)
192         {
193                 self.use();
194                 return;
195         }
196
197         if(WEP_CVAR_PRI(electro, midaircombo_radius))
198         {
199                 float found = 0;
200                 entity e = WarpZone_FindRadius(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), TRUE);
201
202                 // loop through nearby orbs and trigger them
203                 while(e)
204                 {
205                         if(e.classname == "electro_orb")
206                         {
207                                 // change owner to whoever caused the combo explosion
208                                 e.realowner = self.realowner;
209                                 e.takedamage = DAMAGE_NO;
210                                 e.classname = "electro_orb_chain";
211
212                                 // now set the next one to trigger as well
213                                 e.think = W_Electro_ExplodeCombo;
214                                 
215                                 // delay combo chains, looks cooler
216                                 e.nextthink =
217                                         (
218                                                 time
219                                                 +
220                                                 (WEP_CVAR(electro, combo_speed) ?
221                                                         (vlen(e.WarpZone_findradius_dist) / WEP_CVAR(electro, combo_speed))
222                                                         :
223                                                         0
224                                                 )
225                                         );
226
227                                 ++found;
228                         }
229                         e = e.chain;
230                 }
231
232                 // if we triggered an orb, should we explode? if not, lets try again next time
233                 if(found && WEP_CVAR_PRI(electro, midaircombo_explode))
234                         { self.use(); }
235                 else
236                         { self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime); }
237         }
238         else { self.nextthink = self.ltime; }
239 }
240
241 void W_Electro_Attack_Bolt(void)
242 {
243         entity proj;
244
245         W_DecreaseAmmo(WEP_CVAR_PRI(electro, ammo));
246
247         W_SetupShot_ProjectileSize(self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(electro, damage));
248
249         pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
250
251         proj = spawn ();
252         proj.classname = "electro_bolt";
253         proj.owner = proj.realowner = self;
254         proj.bot_dodge = TRUE;
255         proj.bot_dodgerating = WEP_CVAR_PRI(electro, damage);
256         proj.use = W_Electro_Explode;
257         proj.think = W_Electro_Bolt_Think;
258         proj.nextthink = time;
259         proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
260         PROJECTILE_MAKETRIGGER(proj);
261         proj.projectiledeathtype = WEP_ELECTRO;
262         setorigin(proj, w_shotorg);
263
264         proj.movetype = MOVETYPE_FLY;
265         W_SetupProjVelocity_PRI(proj, electro);
266         proj.angles = vectoangles(proj.velocity);
267         proj.touch = W_Electro_TouchExplode;
268         setsize(proj, '0 0 -3', '0 0 -3');
269         proj.flags = FL_PROJECTILE;
270         proj.missile_flags = MIF_SPLASH;
271
272         CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO_BEAM, TRUE);
273
274         other = proj; MUTATOR_CALLHOOK(EditProjectile);
275 }
276
277 void W_Electro_Orb_Touch(void)
278 {
279         PROJECTILE_TOUCH;
280         if(other.takedamage == DAMAGE_AIM)
281                 { if(WEP_CVAR_SEC(electro, touchexplode)) { W_Electro_Explode(); } }
282         else
283         {
284                 //UpdateCSQCProjectile(self);
285                 spamsound(self, CH_SHOTS, "weapons/electro_bounce.wav", VOL_BASE, ATTEN_NORM);
286                 self.projectiledeathtype |= HITTYPE_BOUNCE;
287         }
288 }
289
290 void W_Electro_Orb_Damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
291 {
292         if(self.health <= 0)
293                 return;
294
295         // note: combos are usually triggered by W_Electro_TriggerCombo, not damage
296         float is_combo = (inflictor.classname == "electro_orb_chain" || inflictor.classname == "electro_bolt");
297
298         if(!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_combo ? 1 : -1)))
299                 return; // g_projectiles_damage says to halt
300
301         self.health = self.health - damage;
302         if(self.health <= 0)
303         {
304                 self.takedamage = DAMAGE_NO;
305                 self.nextthink = time;
306                 if(is_combo)
307                 {
308                         // change owner to whoever caused the combo explosion
309                         self.realowner = inflictor.realowner;
310                         self.classname = "electro_orb_chain";
311                         self.think = W_Electro_ExplodeCombo;
312                         self.nextthink = time +
313                                 (
314                                         // bound the length, inflictor may be in a galaxy far far away (warpzones)
315                                         min(
316                                                 WEP_CVAR(electro, combo_radius),
317                                                 vlen(self.origin - inflictor.origin)
318                                         )
319                                         /
320                                         // delay combo chains, looks cooler
321                                         WEP_CVAR(electro, combo_speed)
322                                 );
323                 }
324                 else
325                 {
326                         self.use = W_Electro_Explode;
327                         self.think = adaptor_think2use; // not _hittype_splash, as this runs "immediately"
328                 }
329         }
330 }
331
332 void W_Electro_Attack_Orb(void)
333 {
334         W_DecreaseAmmo(WEP_CVAR_SEC(electro, ammo));
335
336         W_SetupShot_ProjectileSize(self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", CH_WEAPON_A, WEP_CVAR_SEC(electro, damage));
337
338         w_shotdir = v_forward; // no TrueAim for grenades please
339
340         pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
341
342         entity proj = spawn();
343         proj.classname = "electro_orb";
344         proj.owner = proj.realowner = self;
345         proj.use = W_Electro_Explode;
346         proj.think = adaptor_think2use_hittype_splash;
347         proj.bot_dodge = TRUE;
348         proj.bot_dodgerating = WEP_CVAR_SEC(electro, damage);
349         proj.nextthink = time + WEP_CVAR_SEC(electro, lifetime);
350         PROJECTILE_MAKETRIGGER(proj);
351         proj.projectiledeathtype = WEP_ELECTRO | HITTYPE_SECONDARY;
352         setorigin(proj, w_shotorg);
353
354         //proj.glow_size = 50;
355         //proj.glow_color = 45;
356         proj.movetype = MOVETYPE_BOUNCE;
357         W_SetupProjVelocity_UP_SEC(proj, electro);
358         proj.touch = W_Electro_Orb_Touch;
359         setsize(proj, '0 0 -4', '0 0 -4');
360         proj.takedamage = DAMAGE_YES;
361         proj.damageforcescale = WEP_CVAR_SEC(electro, damageforcescale);
362         proj.health = WEP_CVAR_SEC(electro, health);
363         proj.event_damage = W_Electro_Orb_Damage;
364         proj.flags = FL_PROJECTILE;
365         proj.damagedbycontents = (WEP_CVAR_SEC(electro, damagedbycontents));
366
367         proj.bouncefactor = WEP_CVAR_SEC(electro, bouncefactor);
368         proj.bouncestop = WEP_CVAR_SEC(electro, bouncestop);
369         proj.missile_flags = MIF_SPLASH | MIF_ARC;
370
371 #if 0
372         entity p2;
373         p2 = spawn();
374         copyentity(proj, p2);
375         setmodel(p2, "models/ebomb.mdl");
376         setsize(p2, proj.mins, proj.maxs);
377 #endif
378
379         CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO, FALSE); // no culling, it has sound
380
381         other = proj; MUTATOR_CALLHOOK(EditProjectile);
382 }
383
384 void W_Electro_CheckAttack()
385 {
386         if(self.electro_count > 1)
387         if(self.BUTTON_ATCK2)
388         if(weapon_prepareattack(1, -1))
389         {
390                 W_Electro_Attack_Orb();
391                 self.electro_count -= 1;
392                 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
393                 return;
394         }
395         // WEAPONTODO: when the player releases the button, cut down the length of refire2? 
396         w_ready();
397 }
398
399 .float bot_secondary_electromooth;
400 float W_Electro(float req)
401 {
402         float ammo_amount;
403         switch(req)
404         {
405                 case WR_AIM:
406                 {
407                         self.BUTTON_ATCK = self.BUTTON_ATCK2 = FALSE;
408                         if(vlen(self.origin-self.enemy.origin) > 1000) { self.bot_secondary_electromooth = 0; }
409                         if(self.bot_secondary_electromooth == 0)
410                         {
411                                 float shoot;
412
413                                 if(WEP_CVAR_PRI(electro, speed))
414                                         shoot = bot_aim(WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), FALSE);
415                                 else
416                                         shoot = bot_aim(1000000, 0, 0.001, FALSE);
417
418                                 if(shoot)
419                                 {
420                                         self.BUTTON_ATCK = TRUE;
421                                         if(random() < 0.01) self.bot_secondary_electromooth = 1;
422                                 }
423                         }
424                         else
425                         {
426                                 if(bot_aim(WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), TRUE))
427                                 {
428                                         self.BUTTON_ATCK2 = TRUE;
429                                         if(random() < 0.03) self.bot_secondary_electromooth = 0;
430                                 }
431                         }
432                         
433                         return TRUE;
434                 }
435                 case WR_THINK:
436                 {
437                         if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO
438                         {
439                                 ammo_amount = 0;
440                                 if(self.clip_load >= WEP_CVAR_PRI(electro, ammo))
441                                         ammo_amount = 1;
442                                 if(self.clip_load >= WEP_CVAR_SEC(electro, ammo))
443                                         ammo_amount += 1;
444
445                                 if(!ammo_amount)
446                                 {
447                                         WEP_ACTION(self.weapon, WR_RELOAD);
448                                         return FALSE;
449                                 }
450                                 
451                                 return TRUE;
452                         }
453                         
454                         if(self.BUTTON_ATCK)
455                         {
456                                 if(weapon_prepareattack(0, WEP_CVAR_PRI(electro, refire)))
457                                 {
458                                                 W_Electro_Attack_Bolt();
459                                                 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
460                                 }
461                         }
462                         else if(self.BUTTON_ATCK2)
463                         {
464                                 if(time >= self.electro_secondarytime)
465                                 if(weapon_prepareattack(1, WEP_CVAR_SEC(electro, refire)))
466                                 {
467                                         W_Electro_Attack_Orb();
468                                         self.electro_count = WEP_CVAR_SEC(electro, count);
469                                         weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
470                                         self.electro_secondarytime = time + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor();
471                                 }
472                         }
473
474                         return TRUE;
475                 }
476                 case WR_INIT:
477                 {
478                         precache_model("models/weapons/g_electro.md3");
479                         precache_model("models/weapons/v_electro.md3");
480                         precache_model("models/weapons/h_electro.iqm");
481                         precache_sound("weapons/electro_bounce.wav");
482                         precache_sound("weapons/electro_fire.wav");
483                         precache_sound("weapons/electro_fire2.wav");
484                         precache_sound("weapons/electro_impact.wav");
485                         precache_sound("weapons/electro_impact_combo.wav");
486                         ELECTRO_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
487                         return TRUE;
488                 }
489                 case WR_CHECKAMMO1:
490                 {
491                         ammo_amount = self.WEP_AMMO(WEP_ELECTRO) >= WEP_CVAR_PRI(electro, ammo);
492                         ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= WEP_CVAR_PRI(electro, ammo);
493                         return ammo_amount;
494                 }
495                 case WR_CHECKAMMO2:
496                 {
497                         if(WEP_CVAR(electro, combo_safeammocheck)) // true if you can fire at least one secondary blob AND one primary shot after it, otherwise false.
498                         {
499                                 ammo_amount = self.WEP_AMMO(WEP_ELECTRO) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
500                                 ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
501                         }
502                         else
503                         {
504                                 ammo_amount = self.WEP_AMMO(WEP_ELECTRO) >= WEP_CVAR_SEC(electro, ammo);
505                                 ammo_amount += self.(weapon_load[WEP_ELECTRO]) >= WEP_CVAR_SEC(electro, ammo);
506                         }
507                         return ammo_amount;
508                 }
509                 case WR_CONFIG:
510                 {
511                         ELECTRO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
512                         return TRUE;
513                 }
514                 case WR_RESETPLAYER:
515                 {
516                         self.electro_secondarytime = time;
517                         return TRUE;
518                 }
519                 case WR_RELOAD:
520                 {
521                         W_Reload(min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), "weapons/reload.wav");
522                         return TRUE;
523                 }
524                 case WR_SUICIDEMESSAGE:
525                 {
526                         if(w_deathtype & HITTYPE_SECONDARY)
527                                 return WEAPON_ELECTRO_SUICIDE_ORBS;
528                         else
529                                 return WEAPON_ELECTRO_SUICIDE_BOLT;
530                 }
531                 case WR_KILLMESSAGE:
532                 {
533                         if(w_deathtype & HITTYPE_SECONDARY)
534                         {
535                                 return WEAPON_ELECTRO_MURDER_ORBS;
536                         }
537                         else
538                         {
539                                 if(w_deathtype & HITTYPE_BOUNCE)
540                                         return WEAPON_ELECTRO_MURDER_COMBO;
541                                 else
542                                         return WEAPON_ELECTRO_MURDER_BOLT;
543                         }
544                 }
545         }
546         return TRUE;
547 }
548 #endif
549 #ifdef CSQC
550 float W_Electro(float req)
551 {
552         switch(req)
553         {
554                 case WR_IMPACTEFFECT:
555                 {
556                         vector org2;
557                         org2 = w_org + w_backoff * 6;
558                         if(w_deathtype & HITTYPE_SECONDARY)
559                         {
560                                 pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1);
561                                 if(!w_issilent)
562                                         sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM);
563                         }
564                         else
565                         {
566                                 if(w_deathtype & HITTYPE_BOUNCE)
567                                 {
568                                         // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
569                                         pointparticles(particleeffectnum("electro_combo"), org2, '0 0 0', 1);
570                                         if(!w_issilent)
571                                                 sound(self, CH_SHOTS, "weapons/electro_impact_combo.wav", VOL_BASE, ATTEN_NORM);
572                                 }
573                                 else
574                                 {
575                                         pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1);
576                                         if(!w_issilent)
577                                                 sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM);
578                                 }
579                         }
580                         
581                         return TRUE;
582                 }
583                 case WR_INIT:
584                 {
585                         precache_sound("weapons/electro_impact.wav");
586                         precache_sound("weapons/electro_impact_combo.wav");
587                         return TRUE;
588                 }
589                 case WR_ZOOMRETICLE:
590                 {
591                         // no weapon specific image for this weapon
592                         return FALSE;
593                 }
594         }
595         return TRUE;
596 }
597 #endif
598 #endif