]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_onslaught.qc
Merge branch 'master' into Mario/turrets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_onslaught.qc
index 9ad119166dd6b15374b5c327e2449beb944b43e6..06b65cad589df7aaec2c0af0753862fc61e25841 100644 (file)
@@ -1,3 +1,7 @@
+#include "../_all.qh"
+
+#include "gamemode.qh"
+
 float autocvar_g_onslaught_spawn_at_controlpoints;
 float autocvar_g_onslaught_spawn_at_generator;
 float autocvar_g_onslaught_cp_proxydecap;
@@ -25,7 +29,7 @@ void onslaught_link_checkupdate();
 entity ons_red_generator;
 entity ons_blue_generator;
 
-void ons_gib_damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector vforce)
+void ons_gib_damage (entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector vforce)
 {
        self.velocity = self.velocity + vforce;
 }
@@ -49,7 +53,7 @@ void ons_throwgib_think()
 
        if(d>2)
        if(random()<0.6)
-               pointparticles(particleeffectnum("onslaught_generator_gib_flame"), self.origin, '0 0 0', 1);
+               Send_Effect("onslaught_generator_gib_flame", self.origin, '0 0 0', 1);
 }
 
 void ons_throwgib(vector v_from, vector v_to, string smodel, float f_lifetime, float b_burn)
@@ -486,11 +490,11 @@ void onslaught_generator_damage_think()
        if(random() < 0.9 - self.owner.health / self.owner.max_health)
                if(random() < 0.01)
                {
-                       pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
+                       Send_Effect("electro_ballexplode", self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
                        sound(self, CH_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTEN_NORM);
                }
                else
-                       pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
+                       Send_Effect("torch_small", self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
 }
 
 void onslaught_generator_damage_spawn(entity gd_owner)
@@ -535,7 +539,7 @@ void onslaught_generator_deaththink()
        for(i=0;i < 10;++i)
        {
                org = self.origin + randompos('-30 -30 -30' * i + '0 0 -20', '30 30 30' * i + '0 0 20');
-               pointparticles(particleeffectnum("onslaught_generator_gib_explode"), org, '0 0 0', 1);
+               Send_Effect("onslaught_generator_gib_explode", org, '0 0 0', 1);
        }
 
        // Short explosion sound + small explosion
@@ -547,7 +551,7 @@ void onslaught_generator_deaththink()
 
        // Particles
        org = self.origin + randompos(self.mins + '8 8 8', self.maxs + '-8 -8 -8');
-       pointparticles(particleeffectnum("onslaught_generator_smallexplosion"), org, '0 0 0', 1);
+       Send_Effect("onslaught_generator_smallexplosion", org, '0 0 0', 1);
 
        // rays
        if(random() > 0.25 )
@@ -561,7 +565,7 @@ void onslaught_generator_deaththink()
                org = self.origin;
                te_explosion(org);
                onslaught_generator_shockwave_spawn(org);
-               pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
+               Send_Effect("onslaught_generator_finalexplosion", org, '0 0 0', 1);
                sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
        }
        else
@@ -570,7 +574,7 @@ void onslaught_generator_deaththink()
        self.count = self.count - 1;
 }
 
-void onslaught_generator_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void onslaught_generator_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        float i;
        if (damage <= 0)
@@ -675,7 +679,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
        else
        {
                // particles on every hit
-               pointparticles(particleeffectnum("sparks"), hitloc, force * -1, 1);
+               Send_Effect("sparks", hitloc, force * -1, 1);
 
                //sound on every hit
                if (random() < 0.5)
@@ -966,7 +970,7 @@ void spawnfunc_onslaught_generator()
 float ons_notification_time_team1;
 float ons_notification_time_team2;
 
-void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        entity oself;
        float nag;
@@ -1022,7 +1026,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        // colormod flash when shot
        self.colormod = '2 2 2';
        // particles on every hit
-       pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
+       Send_Effect("sparks", hitloc, force*-1, 1);
        //sound on every hit
        if (random() < 0.5)
                sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTEN_NORM);
@@ -1032,7 +1036,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        if (self.health < 0)
        {
                sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+               Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
                {
                        string t;
                        t = Team_ColoredFullName(attacker.team);
@@ -1205,7 +1209,7 @@ void onslaught_controlpoint_icon_think()
        // damaged fx
        if(random() < 0.6 - self.health / self.max_health)
        {
-               pointparticles(particleeffectnum("electricity_sparks"), self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
+               Send_Effect("electricity_sparks", self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
 
                if(random() > 0.8)
                        sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTEN_NORM);
@@ -1260,12 +1264,9 @@ void onslaught_controlpoint_icon_buildthink()
        //setsize(self, '-32 -32 0', '32 32 8');
 
        if(random() < 0.9 - self.health / self.max_health)
-               pointparticles(particleeffectnum("rage"), self.origin + 10 * randomvec(), '0 0 -1', 1);
+               Send_Effect("rage", self.origin + 10 * randomvec(), '0 0 -1', 1);
 }
 
-
-
-
 void onslaught_controlpoint_touch()
 {
        entity e;