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