]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_electro.qc
Merge remote branch 'refs/remotes/origin/terencehill/bot_vs_human_fix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_electro.qc
index 7c61599aeeedcca146dfd971d5d026d71f432974..45168cdacf66fcf60d685f5521ec16f64e2a25aa 100644 (file)
@@ -319,5 +319,41 @@ float w_electro(float req)
 };
 #endif
 #ifdef CSQC
+float w_electro(float req)
+{
+       if(req == WR_IMPACTEFFECT)
+       {
+               vector org2;
+               org2 = w_org + w_backoff * 6;
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1);
+                       if(!w_issilent)
+                               sound(self, CHAN_PROJECTILE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                       {
+                               // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
+                               pointparticles(particleeffectnum("electro_combo"), org2, '0 0 0', 1);
+                               if(!w_issilent)
+                                       sound(self, CHAN_PROJECTILE, "weapons/electro_impact_combo.wav", VOL_BASE, ATTN_NORM);
+                       }
+                       else
+                       {
+                               pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1);
+                               if(!w_issilent)
+                                       sound(self, CHAN_PROJECTILE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
+                       }
+               }
+       }
+       else if(req == WR_PRECACHE)
+       {
+               precache_sound("weapons/electro_impact.wav");
+               precache_sound("weapons/electro_impact_combo.wav");
+       }
+       return TRUE;
+}
 #endif
 #endif