]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_seeker.qc
Merge branch 'master' into mirceakitsune/multijump
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_seeker.qc
index 83d615884c89e2b81473c279404197acbd65473b..c91e4f40869ff7fb11e74a8cd9f514422c31b790 100644 (file)
@@ -1,6 +1,7 @@
 #ifdef REGISTER_WEAPON
 REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 9, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", "T.A.G. Seeker");
 #else
+#ifdef SVQC
 //.float speed; = switchweapon
 //.float proxytime; = autoswitch
 //.float tl; = wait
@@ -467,15 +468,87 @@ float w_seeker(float req)
                return self.ammo_rockets >= cvar("g_balance_seeker_tag_ammo") + cvar("g_balance_seeker_missile_ammo");
        else if (req == WR_CHECKAMMO2)
                return self.ammo_rockets >= cvar("g_balance_seeker_flac_ammo");
+       return TRUE;
+};
+#endif
+#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");
+       }
        else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "played with tiny rockets";
+               w_deathtypestring = "%s played with tiny rockets";
        else if (req == WR_KILLMESSAGE)
        {
                if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "ran into #'s flac";
+                       w_deathtypestring = "%s ran into %s's flac";
                else
-                       w_deathtypestring = "was tagged by";
+                       w_deathtypestring = "%s was tagged by %s";
        }
        return TRUE;
-};
+}
+#endif
 #endif