]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_hagar.qc
move projectile explosions including precaching into w_*.qc; client/damage.qc now...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hagar.qc
index 638e18bcc261f5f718de326eb40647d3640f8e6a..c95a90e5dae9d78cf135fc143ea3c69b1f75cebe 100644 (file)
@@ -1,6 +1,7 @@
 #ifdef REGISTER_WEAPON
 REGISTER_WEAPON(HAGAR, w_hagar, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hagar", "hagar", "Hagar");
 #else
+#ifdef SVQC
 // NO bounce protection, as bounces are limited!
 void W_Hagar_Explode (void)
 {
@@ -162,3 +163,31 @@ float w_hagar(float req)
        return TRUE;
 };
 #endif
+#ifdef CSQC
+float w_hagar(float req)
+{
+       if(req == WR_IMPACTEFFECT)
+       {
+               vector org2;
+               org2 = w_org + w_backoff * 6;
+               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+               if(!w_issilent)
+               {
+                       if (w_random<0.15)
+                               sound(self, CHAN_PROJECTILE, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
+                       else if (w_random<0.7)
+                               sound(self, CHAN_PROJECTILE, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
+                       else
+                               sound(self, CHAN_PROJECTILE, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
+               }
+       }
+       else if(req == WR_PRECACHE)
+       {
+               precache_sound("weapons/hagexp1.wav");
+               precache_sound("weapons/hagexp2.wav");
+               precache_sound("weapons/hagexp3.wav");
+       }
+       return TRUE;
+}
+#endif
+#endif