]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_seeker.qc
move projectile explosions including precaching into w_*.qc; client/damage.qc now...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_seeker.qc
index cdb4615c731dff66d994878ed74fbb925bca2a08..3b23c211294895996cfd5ca80567b4f5b1fc271d 100644 (file)
@@ -483,6 +483,71 @@ float w_seeker(float req)
 #ifdef CSQC
 float w_seeker(float req)
 {
+       if(req == WR_IMPACTEFFECT)
+       {
+               vector org2;
+               org2 = w_org + w_backoff * 6;
+               if(w_deathtype & HITTYPE_SECONDARY)
+               {
+                       pointparticles(particleeffectnum("flac_explode"), org2, '0 0 0', 1);
+                       if(!w_issilent)
+                       {
+                               if (w_random<0.15)
+                                       sound(self, CHAN_PROJECTILE, "weapons/flacexp1.wav", 1, ATTN_NORM);
+                               else if (w_random<0.7)
+                                       sound(self, CHAN_PROJECTILE, "weapons/flacexp2.wav", 1, ATTN_NORM);
+                               else
+                                       sound(self, CHAN_PROJECTILE, "weapons/flacexp3.wav", 1, ATTN_NORM);
+                       }
+               }
+               else
+               {
+                       if(w_deathtype & HITTYPE_BOUNCE)
+                       {
+                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                               if(!w_issilent)
+                               {
+                                       if (w_random<0.15)
+                                               sound(self, CHAN_PROJECTILE, "weapons/tagexp1.wav", 1, ATTN_NORM);
+                                       else if (w_random<0.7)
+                                               sound(self, CHAN_PROJECTILE, "weapons/tagexp2.wav", 1, ATTN_NORM);
+                                       else
+                                               sound(self, CHAN_PROJECTILE, "weapons/tagexp3.wav", 1, ATTN_NORM);
+                               }
+                       }
+                       else if(w_deathtype & HITTYPE_HEADSHOT)
+                       {
+                               if(!w_issilent)
+                                       sound(self, CHAN_PROJECTILE, "weapons/tag_impact.wav", 1, ATTN_NORM);
+                       }
+                       else
+                       {
+                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                               if(!w_issilent)
+                               {
+                                       if (w_random<0.15)
+                                               sound(self, CHAN_PROJECTILE, "weapons/seekerexp1.wav", 1, ATTN_NORM);
+                                       else if (w_random<0.7)
+                                               sound(self, CHAN_PROJECTILE, "weapons/seekerexp2.wav", 1, ATTN_NORM);
+                                       else
+                                               sound(self, CHAN_PROJECTILE, "weapons/seekerexp3.wav", 1, ATTN_NORM);
+                               }
+                       }
+               }
+       }
+       else if(req == WR_PRECACHE)
+       {
+               precache_sound("weapons/flacexp1.wav");
+               precache_sound("weapons/flacexp2.wav");
+               precache_sound("weapons/flacexp3.wav");
+               precache_sound("weapons/seekerexp1.wav");
+               precache_sound("weapons/seekerexp2.wav");
+               precache_sound("weapons/seekerexp3.wav");
+               precache_sound("weapons/tagexp1.wav");
+               precache_sound("weapons/tagexp2.wav");
+               precache_sound("weapons/tagexp3.wav");
+               precache_sound("weapons/tag_impact.wav");
+       }
        return TRUE;
 }
 #endif