]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Effects: make sending entities easier, make sending server ids harder
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 30 Oct 2015 06:02:50 +0000 (17:02 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 30 Oct 2015 06:04:22 +0000 (17:04 +1100)
44 files changed:
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/damage.qc
qcsrc/client/generator.qc
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/main.qc
qcsrc/client/particles.qc
qcsrc/common/effects/all.qc
qcsrc/common/effects/effect.qh
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hmg.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/rpc.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/lib/warpzone/common.qc
qcsrc/server/cheats.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/mutators/mutator/gamemode_onslaught.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/tracing.qh

index e2e0e9341ac4a0e5741a085cd69d821e7f7111a9..807ebe4e5ec406ba4a8d747f4d6e49c4410dd77a 100644 (file)
@@ -532,9 +532,9 @@ void CSQCModel_Effects_Apply(void)
        if(eff & EF_FULLBRIGHT)
                self.renderflags |= RF_FULLBRIGHT;
        if(eff & EF_FLAME)
-               pointparticles(particleeffectnum(EFFECT_EF_FLAME), self.origin, '0 0 0', bound(0, frametime, 0.1));
+               pointparticles(EFFECT_EF_FLAME, self.origin, '0 0 0', bound(0, frametime, 0.1));
        if(eff & EF_STARDUST)
-               pointparticles(particleeffectnum(EFFECT_EF_STARDUST), self.origin, '0 0 0', bound(0, frametime, 0.1));
+               pointparticles(EFFECT_EF_STARDUST, self.origin, '0 0 0', bound(0, frametime, 0.1));
        if(eff & EF_NOSHADOW)
                self.renderflags |= RF_NOSHADOW;
        if(eff & EF_NODEPTHTEST)
index 34890e034eaaeb323495e02d606eda203a0eb7af..803b241d09b7529bf4872fb4918c7c8cf7bc6556 100644 (file)
@@ -42,7 +42,7 @@ void DamageEffect_Think()
        // now generate the particles
        vector org;
        org = gettaginfo(self, 0); // origin at attached location
-       pointparticles(self.team, org, '0 0 0', 1);
+       __pointparticles(self.team, org, '0 0 0', 1);
 }
 
 void DamageEffect(vector hitorg, float thedamage, int type, int specnum)
@@ -222,33 +222,33 @@ void Ent_DamageInfo(float isNew)
                        // spiderbot
                        case DEATH_VH_SPID_MINIGUN:
                                sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_SPIDERBOT_MINIGUN_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_SPIDERBOT_MINIGUN_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_SPID_ROCKET:
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_SPIDERBOT_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_SPIDERBOT_ROCKET_EXPLODE, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_SPID_DEATH:
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_EXPLOSION_BIG, self.origin, w_backoff * 1000, 1);
                                break;
 
                        case DEATH_VH_WAKI_GUN:
                                sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_RACER_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_RACER_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_WAKI_ROCKET:
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_RACER_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_RACER_ROCKET_EXPLODE, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_WAKI_DEATH:
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_EXPLOSION_BIG, self.origin, w_backoff * 1000, 1);
                                break;
 
                        case DEATH_VH_RAPT_CANNON:
                                sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_RAPTOR_CANNON_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_RAPTOR_CANNON_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_FRAGMENT:
                                float i;
@@ -260,19 +260,19 @@ void Ent_DamageInfo(float isNew)
                                        RaptorCBShellfragToss(w_org, vel, ang + '0 0 1' * (120 * i));
                                }
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_RAPTOR_BOMB_SPREAD), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_RAPTOR_BOMB_SPREAD, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_BOMB:
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_RAPTOR_BOMB_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_RAPTOR_BOMB_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_DEATH:
                                sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_EXPLOSION_BIG, self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_BUMB_GUN:
                                sound(self, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_BIGPLASMA_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_BIGPLASMA_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
                }
        }
@@ -292,11 +292,11 @@ void Ent_DamageInfo(float isNew)
                {
                         case DEATH_TURRET_EWHEEL:
                                sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_BLASTER_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_FLAC:
-                               pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), w_org, '0 0 0', 1);
+                               pointparticles(EFFECT_HAGAR_EXPLODE, w_org, '0 0 0', 1);
                                sound(self, CH_SHOTS, SND_HAGEXP_RANDOM(), VOL_BASE, ATTEN_NORM);
                                break;
 
@@ -305,23 +305,23 @@ void Ent_DamageInfo(float isNew)
                         case DEATH_TURRET_WALK_ROCKET:
                         case DEATH_TURRET_HELLION:
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_ROCKET_EXPLODE, self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_MACHINEGUN:
                         case DEATH_TURRET_WALK_GUN:
                                sound(self, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_MACHINEGUN_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_PLASMA:
                                sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_ELECTRO_IMPACT, self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_WALK_MELEE:
                                sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum(EFFECT_TE_SPARK), self.origin, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_TE_SPARK, self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_PHASER:
index d7114d1bf4b904ae36d685fb6444507e50eb0151..77e1c545ac5b671afca4ee369012d0fa148eb58c 100644 (file)
@@ -58,11 +58,11 @@ void generator_draw(entity this)
                if(random() < 0.9 - self.health / self.max_health)
                if(random() < 0.01)
                {
-                       pointparticles(particleeffectnum(EFFECT_ELECTRO_BALLEXPLODE), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
+                       pointparticles(EFFECT_ELECTRO_BALLEXPLODE, self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
                        sound(self, CH_TRIGGER, SND_ONS_ELECTRICITY_EXPLODE, VOL_BASE, ATTEN_NORM);
                }
                else
-                       pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_DAMAGED), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
+                       pointparticles(EFFECT_ONS_GENERATOR_DAMAGED, self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
 
                self.move_time = time + 0.1;
 
@@ -79,7 +79,7 @@ void generator_draw(entity this)
        if(self.count==40||self.count==20)
        {
                sound(self, CH_TRIGGER, SND_ONS_SHOCKWAVE, VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum(EFFECT_ELECTRO_COMBO), self.origin, '0 0 0', 6);
+               pointparticles(EFFECT_ELECTRO_COMBO, self.origin, '0 0 0', 6);
        }
 
        // rays
@@ -92,7 +92,7 @@ void generator_draw(entity this)
        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(EFFECT_ONS_GENERATOR_GIB), org, '0 0 0', 1);
+               pointparticles(EFFECT_ONS_GENERATOR_GIB, org, '0 0 0', 1);
        }
 
        // Short explosion sound + small explosion
@@ -104,14 +104,14 @@ void generator_draw(entity this)
 
        // Particles
        org = self.origin + randompos(self.mins + '8 8 8', self.maxs + '-8 -8 -8');
-       pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_EXPLODE), org, '0 0 0', 1);
+       pointparticles(EFFECT_ONS_GENERATOR_EXPLODE, org, '0 0 0', 1);
 
        // Final explosion
        if(self.count==1)
        {
                org = self.origin;
                te_explosion(org);
-               pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_EXPLODE2), org, '0 0 0', 1);
+               pointparticles(EFFECT_ONS_GENERATOR_EXPLODE2, org, '0 0 0', 1);
                sound(self, CH_TRIGGER, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
        }
 
index 4afa5eb88ac47a45155b614a69854d78b9060226..6b27d0a41a0d2349a7f879d78c76ca426c612934 100644 (file)
@@ -61,7 +61,7 @@ void new_te_bloodshower (int ef, vector org, float explosionspeed, int howmany)
        float i, pmod;
        pmod = autocvar_cl_particles_quality;
        for (i = 0; i < 50 * pmod; ++i)
-               pointparticles(ef, org, randomvec() * explosionspeed, howmany / 50);
+               __pointparticles(ef, org, randomvec() * explosionspeed, howmany / 50);
 }
 
 void SUB_RemoveOnNoImpact()
@@ -82,7 +82,7 @@ void Gib_Touch()
 
        if(!self.silent)
                sound(self, CH_PAIN, SND_GIB_SPLAT_RANDOM(), VOL_BASE, ATTEN_NORM);
-       pointparticles(_particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
+       __pointparticles(_particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
 
        Gib_Delete();
 }
@@ -98,9 +98,9 @@ void Gib_Draw(entity this)
 
        if(self.touch == Gib_Touch) // don't do this for the "chunk" thingie...
                // TODO somehow make it spray in a direction dependent on self.angles
-               trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_SLIGHTBLOOD.eent_eff_name)), oldorg, self.origin);
+               __trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_SLIGHTBLOOD.eent_eff_name)), oldorg, self.origin);
        else
-               trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_BLOOD.eent_eff_name)), oldorg, self.origin);
+               __trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_BLOOD.eent_eff_name)), oldorg, self.origin);
 
        self.renderflags = 0;
 
@@ -251,17 +251,17 @@ void Ent_GibSplash(bool isNew)
                        }
                        break;
                case 0x02:
-                       pointparticles(_particleeffectnum(strcat(specstr, "blood")), org, vel, amount * 16);
+                       __pointparticles(_particleeffectnum(strcat(specstr, "blood")), org, vel, amount * 16);
                        break;
                case 0x03:
                        if(prandom() < amount)
                                TossGib ("models/gibs/chunk.mdl", org, org, vel, prandomvec() * (prandom() * 30 + 20), specnum, 1, issilent); // TODO maybe adjust to more randomization?
                        break;
                case 0x81:
-                       pointparticles(_particleeffectnum(strcat(gentle_prefix, "damage_dissolve")), org, vel, amount);
+                       __pointparticles(_particleeffectnum(strcat(gentle_prefix, "damage_dissolve")), org, vel, amount);
                        break;
                case 0x82:
-                       pointparticles(_particleeffectnum(strcat(gentle_prefix, "damage_hit")), org, vel, amount * 16);
+                       __pointparticles(_particleeffectnum(strcat(gentle_prefix, "damage_hit")), org, vel, amount * 16);
                        break;
                case 0x83:
                        // no gibs in gentle mode, sorry
index 5b8d09312049202197e379e5cb616b504fb8892b..eb5cc8dd1e3a7cb4700048ae7cc8db2cfbc46fbe 100644 (file)
@@ -152,7 +152,7 @@ void Draw_GrapplingHook(entity this)
                case ENT_CLIENT_HOOK:
                        break;
                case ENT_CLIENT_ARC_BEAM:
-                       pointparticles(particleeffectnum(EFFECT_ARC_LIGHTNING2), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
+                       pointparticles(EFFECT_ARC_LIGHTNING2, trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
                        break;
        }
 }
index 9d20c406197b3b99fbe874c02bac808248df679b..ac3d8f2aedf194f77b334cc4e15dbc3f19947739 100644 (file)
@@ -662,7 +662,7 @@ void Ent_ReadAccuracy()
 
 void Spawn_Draw(entity this)
 {
-       pointparticles(this.cnt, this.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
+       __pointparticles(this.cnt, this.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
 }
 
 void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
@@ -732,11 +732,11 @@ void Ent_ReadSpawnEvent(float is_new)
                        {
                                switch(teamnum)
                                {
-                                       case NUM_TEAM_1: pointparticles(particleeffectnum(EFFECT_SPAWN_RED), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_2: pointparticles(particleeffectnum(EFFECT_SPAWN_BLUE), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_3: pointparticles(particleeffectnum(EFFECT_SPAWN_YELLOW), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_4: pointparticles(particleeffectnum(EFFECT_SPAWN_PINK), self.origin, '0 0 0', 1); break;
-                                       default: pointparticles(particleeffectnum(EFFECT_SPAWN_NEUTRAL), self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_1: pointparticles(EFFECT_SPAWN_RED, self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_2: pointparticles(EFFECT_SPAWN_BLUE, self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_3: pointparticles(EFFECT_SPAWN_YELLOW, self.origin, '0 0 0', 1); break;
+                                       case NUM_TEAM_4: pointparticles(EFFECT_SPAWN_PINK, self.origin, '0 0 0', 1); break;
+                                       default: pointparticles(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1); break;
                                }
                        }
                        if(autocvar_cl_spawn_event_sound)
index 0c7f7a39f8284710280807bfce42bcb83b04f8fc..9fcc4bd53b77c82af422bc84654b88499d9bdc71 100644 (file)
@@ -12,7 +12,7 @@ void Net_ReadVortexBeamParticle()
        endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
        charge = ReadByte() / 255.0;
 
-       pointparticles(particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH), shotorg, normalize(endpos - shotorg) * 1000, 1);
+       pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
 
        //draw either the old v2.3 beam or the new beam
        charge = sqrt(charge); // divide evenly among trail spacing and alpha
index e90f3c615b36dd5c99adc1ac8604ebaa755fc086..6b136fa49b4b880d79057dcc9fc4c4535727a997 100644 (file)
@@ -30,7 +30,7 @@ void Read_Effect(bool is_new)
                if(eff_trail)
                        WarpZone_TrailParticles(world, particleeffectnum(eff), v, vel);
                else
-                       pointparticles(particleeffectnum(eff), v, vel, eff_cnt);
+                       pointparticles(eff, v, vel, eff_cnt);
        }
 }
 #endif
@@ -88,6 +88,6 @@ void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
                return;
        ));
        // revert to engine handling
-       pointparticles(_particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
+       __pointparticles(_particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
 }
 #endif
index bd9cd99e5621250e395394bd927567114c325d09..088136492b48954b2b151bd25df5f6a045cb2763 100644 (file)
@@ -1,7 +1,21 @@
 #ifndef EFFECT_H
 #define EFFECT_H
 
-#define particleeffectnum(e) _particleeffectnum(e.eent_eff_name)
+#define particleeffectnum(e) \
+       _particleeffectnum(e.eent_eff_name)
+
+#if defined(SVQC)
+       #define pointparticles(effect, org, vel, howmany) \
+               Send_Effect(effect, org, vel, howmany)
+       #define trailparticles(e, effect, org, vel) \
+               ((!e) ? Send_Effect(effect, org, vel, 0) \
+               : __trailparticles(e, particleeffectnum(effect), org, vel))
+#elif defined(CSQC)
+       #define pointparticles(effect, org, vel, howmany) \
+               __pointparticles(particleeffectnum(effect), org, vel, howmany)
+       #define trailparticles(e, effect, org, vel) \
+               __trailparticles(e, particleeffectnum(effect), org, vel)
+#endif
 
 .int m_id;
 .string eent_eff_name;
index 4164f8341ac8feaa2969f18a879d635ae7433676..e03e23ea73c022f16cbf61f493967c2c52a8e808 100644 (file)
@@ -211,7 +211,7 @@ void func_breakable_destroy()
                RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, world, self.dmg_force, DEATH_HURTTRIGGER.m_id, world);
 
        if(self.cnt) // TODO
-               pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
+               __pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
 
        if(self.respawntime)
        {
index a4f31b2fd81c0e2b25e4597b0234b3c327a1329c..3b37f0f76f4489f9c2869e83a0bf1e5779d437ab 100644 (file)
@@ -221,11 +221,11 @@ void Draw_PointParticles(entity this)
                        {
                                traceline(p, p + normalize(self.movedir) * 4096, 0, world);
                                p = trace_endpos;
-                               pointparticles(self.cnt, p, trace_plane_normal * vlen(self.movedir) + self.velocity + randomvec() * self.waterlevel, self.count);
+                               __pointparticles(self.cnt, p, trace_plane_normal * vlen(self.movedir) + self.velocity + randomvec() * self.waterlevel, self.count);
                        }
                        else
                        {
-                               pointparticles(self.cnt, p, self.velocity + randomvec() * self.waterlevel, self.count);
+                               __pointparticles(self.cnt, p, self.velocity + randomvec() * self.waterlevel, self.count);
                        }
                        if(self.noise != "")
                        {
index 06ca7054352696b92061a23a1ce3aa52ce61acb3..e1c9cafb058b13830daa095668337178621f7217 100644 (file)
@@ -316,7 +316,7 @@ void Draw_Laser(entity this)
        if (!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
        {
                if(self.cnt >= 0)
-                       pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000);
+                       __pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000);
                if(self.colormod != '0 0 0' && self.modelscale != 0)
                        adddynamiclight(trace_endpos + trace_plane_normal * 1, self.modelscale, self.colormod * 5);
        }
index 582113cf807e9b48eecc85ac0c5db3d6f2e3aaba..a38445b634cb3334f25b4a26a4e5cc30acce9ee0 100644 (file)
@@ -45,11 +45,11 @@ void turret_draw(entity this)
 
        if(self.health < 85)
        if(dt < 0.01)
-               pointparticles(particleeffectnum(EFFECT_SMOKE_LARGE), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(EFFECT_SMOKE_LARGE, (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
        if(self.health < 32)
        if(dt < 0.015)
-               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(EFFECT_SMOKE_SMALL, (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
 }
 
@@ -273,7 +273,7 @@ void turret_gibboom()
        float i;
 
        sound (self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
+       pointparticles(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
 
        for (i = 1; i < 5; i = i + 1)
                turret_gibtoss(strcat("models/turrets/head-gib", ftos(i), ".md3"), self.origin + '0 0 2', self.velocity + randomvec() * 700, '0 0 0', false);
@@ -319,7 +319,7 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
 void turret_die()
 {SELFPARAM();
        sound (self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
+       pointparticles(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
        if (!autocvar_cl_nogibs)
        {
                // Base
index a00cdcfa343dd4e8b207b2ab3ed06e3370557f36..1a315f4f4c70ac4e1e2a3fe6567e72da43856fb5 100644 (file)
@@ -634,7 +634,7 @@ void vehicles_painframe()
                float _ftmp;
                _ftmp = self.owner.vehicle_health / 50;
                self.pain_frame = time + 0.1 + (random() * 0.5 * _ftmp);
-               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(EFFECT_SMOKE_SMALL, (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
                if(self.vehicle_flags & VHF_DMGSHAKE)
                        self.velocity += randomvec() * 30;
index 6844efa082b8767321ff45dca41fd1071995a8c3..1f573cda378240b6c70001825c4d9ecd8b602f40 100644 (file)
@@ -257,7 +257,7 @@ float racer_frame()
        {
 #ifdef SVQC
                if(time - racer.wait > 0.2)
-                       pointparticles(particleeffectnum(EFFECT_RACER_BOOSTER), self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
+                       pointparticles(EFFECT_RACER_BOOSTER, self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
 #endif
 
                racer.wait = time;
@@ -278,7 +278,7 @@ float racer_frame()
                {
                        traceline(racer.origin, racer.origin - '0 0 256', MOVE_NORMAL, self);
                        if(trace_fraction != 1.0)
-                               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), trace_endpos, '0 0 0', 1);
+                               pointparticles(EFFECT_SMOKE_SMALL, trace_endpos, '0 0 0', 1);
 
                        racer.invincible_finished = time + 0.1 + (random() * 0.1);
                }
index ec479fe9f80070743cb18d8e5f64748290c0ef83..8cb2487811d61da7bbe89d4286b6f596f5165c55 100644 (file)
@@ -295,7 +295,7 @@ float spiderbot_frame()
 
                        sound (gun, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM);
                        //trailparticles(self, _particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
-                       pointparticles(particleeffectnum(EFFECT_SPIDERBOT_MINIGUN_MUZZLEFLASH), v, v_forward * 2500, 1);
+                       pointparticles(EFFECT_SPIDERBOT_MINIGUN_MUZZLEFLASH, v, v_forward * 2500, 1);
 
                        setself(spider);
 
index 37895b4782f8847ed00d3481175bb45419a6965d..07ddea83317a6bcc09179830fa0a6279085227d7 100644 (file)
@@ -101,10 +101,10 @@ void Ent_ReadArcBeam(float isnew);
 .vector beam_color;
 .float beam_alpha;
 .float beam_thickness;
-.float beam_traileffect;
-.float beam_hiteffect;
+.entity beam_traileffect;
+.entity beam_hiteffect;
 .float beam_hitlight[4]; // 0: radius, 123: rgb
-.float beam_muzzleeffect;
+.entity beam_muzzleeffect;
 .float beam_muzzlelight[4]; // 0: radius, 123: rgb
 .string beam_image;
 
@@ -1258,18 +1258,18 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = (EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1283,19 +1283,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = (EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; // particleeffectnum(EFFECT_GRENADE_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; // (EFFECT_GRENADE_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1309,19 +1309,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL_IMPACT);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM_HEAL);
+                               self.beam_hiteffect = (EFFECT_ARC_BEAM_HEAL_IMPACT);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1335,19 +1335,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = (EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 20;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 0;
                                self.beam_hitlight[3] = 0;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 50;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 0;
                                self.beam_muzzlelight[3] = 0;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1361,19 +1361,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = (EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1387,19 +1387,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = (EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1413,19 +1413,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL_IMPACT2);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM_HEAL);
+                               self.beam_hiteffect = (EFFECT_ARC_BEAM_HEAL_IMPACT2);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1439,19 +1439,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
-                               self.beam_hiteffect = particleeffectnum(EFFECT_ARC_LIGHTNING);
+                               self.beam_traileffect = (EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = (EFFECT_ARC_LIGHTNING);
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
@@ -1467,19 +1467,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = randomvec();
                                self.beam_alpha = 1;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = false;
-                               self.beam_hiteffect = false;
+                               self.beam_traileffect = NULL;
+                               self.beam_hiteffect = NULL;
                                self.beam_hitlight[0] = 0;
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
+                               self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               if(self.beam_muzzleeffect >= 0)
+                               if(self.beam_muzzleeffect)
                                {
                                        setmodel(flash, MDL_ARC_MUZZLEFLASH);
                                        flash.alpha = self.beam_alpha;
index 4ada2d5b7bc90148350b9e03c97f4a789877215a..8c483b346a5c6e2b6acf4066c321347719b878ba 100644 (file)
@@ -262,7 +262,7 @@ void W_Blaster_Attack(
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
+                       pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
                        if(!w_issilent) { sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
                }
 
index 21565113deb92057590483998623cea6a937d410..11e6924d81360585208297ba95eebed0672c27ff 100644 (file)
@@ -683,13 +683,13 @@ void W_Crylink_Attack2(Weapon thiswep)
                        org2 = w_org + w_backoff * 2;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum(EFFECT_CRYLINK_IMPACT2), org2, '0 0 0', 1);
+                               pointparticles(EFFECT_CRYLINK_IMPACT2, org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, SND_CRYLINK_IMPACT2, VOL_BASE, ATTN_NORM);
                        }
                        else
                        {
-                               pointparticles(particleeffectnum(EFFECT_CRYLINK_IMPACT), org2, '0 0 0', 1);
+                               pointparticles(EFFECT_CRYLINK_IMPACT, org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, SND_CRYLINK_IMPACT, VOL_BASE, ATTN_NORM);
                        }
index 63789a92a8b9aadfe71e7a161ef18cbf1f8b85fa..dbd8f651a0da10b2b3c1922a83a7d72fc2b29d9f 100644 (file)
@@ -639,7 +639,7 @@ void W_Devastator_Attack(Weapon thiswep)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTN_NORM);
                }
index bf183b35ed33e5a3bd63ae224530b29ec1ed36af..8ae3f3e3c02231730afe8eeb5bd87f1e46689c20 100644 (file)
@@ -557,7 +557,7 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire)
                        org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum(EFFECT_ELECTRO_BALLEXPLODE), org2, '0 0 0', 1);
+                               pointparticles(EFFECT_ELECTRO_BALLEXPLODE, org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
                        }
@@ -566,13 +566,13 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire)
                                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(EFFECT_ELECTRO_COMBO), org2, '0 0 0', 1);
+                                       pointparticles(EFFECT_ELECTRO_COMBO, org2, '0 0 0', 1);
                                        if(!w_issilent)
                                                sound(self, CH_SHOTS, SND_ELECTRO_IMPACT_COMBO, VOL_BASE, ATTEN_NORM);
                                }
                                else
                                {
-                                       pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), org2, '0 0 0', 1);
+                                       pointparticles(EFFECT_ELECTRO_IMPACT, org2, '0 0 0', 1);
                                        if(!w_issilent)
                                                sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
                                }
index 3a236a36e5ae6474c43c1b54ba5669dc391d664a..a2ff0de5963b0476dc9b3e531a6786ebeab7b68e 100644 (file)
@@ -443,7 +443,7 @@ void W_Fireball_Attack2(void)
                        else
                        {
                                org2 = w_org + w_backoff * 16;
-                               pointparticles(particleeffectnum(EFFECT_FIREBALL_EXPLODE), org2, '0 0 0', 1);
+                               pointparticles(EFFECT_FIREBALL_EXPLODE, org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM * 0.25); // long range boom
                        }
index a7c1ecd9e054c7a39d96ab22fdfbb2bffe1a2338..e7621c241c9a9eac2a04d712f5588b2139725026 100644 (file)
@@ -509,7 +509,7 @@ void W_Hagar_Attack2_Load(Weapon thiswep, int slot)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1);
                        if(!w_issilent)
                        {
                                if(w_random<0.15)
index 2c9ed7f8df6c31ad7054fc662c5d5a7709a82c1d..5a91976ff4ad7bc48576eb3b834727c94779f8ea 100644 (file)
@@ -275,7 +275,7 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
+                       pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM);
                }
index 9ebc56f67743e93447c5698c60cda0dd9fe157c2..c7ae7d43b5aa84a7c9103c30c67b025dfb77db6f 100644 (file)
@@ -160,7 +160,7 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, int slot, int f
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), org2, w_backoff * 1000, 1);
+                       pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                if(w_random < 0.05)
                                        sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTEN_NORM);
index 75ed07b178aedc82b2d08e57913176b457f237a6..315310b36e36a5a43f0df93569b63c1dcca28a88 100644 (file)
@@ -313,7 +313,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum(EFFECT_HOOK_EXPLODE), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_HOOK_EXPLODE, org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_HOOKBOMB_IMPACT, VOL_BASE, ATTN_NORM);
                }
index 85fc1aeb1047fa9514c67dc2e0d1a3c976339cac..f27e0916d8c580c1dc9c256cf81b84400118c05d 100644 (file)
@@ -365,7 +365,7 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, entity actor, int slot, int fire)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), org2, w_backoff * 1000, 1);
+                       pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                if(w_random < 0.05)
                                        sound(self, CH_SHOTS, SND_RIC1, VOL_BASE, ATTN_NORM);
index ba255fbe2d329b016c61a0705456d8b5ae2e5cb3..938f20390b2a09964f072d9e86bcc541bbc88095 100644 (file)
@@ -577,7 +577,7 @@ float W_MineLayer_PlacedMines(float detonate)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_MINE_EXP, VOL_BASE, ATTN_NORM);
                }
index 951fa7078af50eb2295a8e567572aed52e9349b9..f2e2013d8b5b14501292ca15ffb5d0ec011607c5 100644 (file)
@@ -417,7 +417,7 @@ void W_Mortar_Attack2(Weapon thiswep)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum(EFFECT_GRENADE_EXPLODE), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_GRENADE_EXPLODE, org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTN_NORM);
                }
index cbe6d39fa370227766edcc91df60200e18311eba..63d77d80fb4404d54d4cfc13c193be3f91c1c09c 100644 (file)
@@ -254,7 +254,7 @@ void W_Rifle_BulletHail(int slot, float mode, void(void) AttackFunc, float fr, f
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum(EFFECT_RIFLE_IMPACT), org2, w_backoff * 1000, 1);
+                       pointparticles(EFFECT_RIFLE_IMPACT, org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                        {
                                if(w_random < 0.2)
index 73794ca03aac47f72ce1e2b4e81b9223524dd4b7..f25bef42fb21778ae9b99d609aa5078a08c9e75a 100644 (file)
@@ -222,7 +222,7 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
                }
index 32deee0d30b22dab07df5c324d323ce656cad04f..8fd7aa89678f596373ca2430dc9ec5cc5a48f0d3 100644 (file)
@@ -723,7 +723,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                                }
                                else
                                {
-                                       pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
+                                       pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1);
                                        if(!w_issilent)
                                        {
                                                if(w_random<0.15)
@@ -737,7 +737,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                        }
                        else
                        {
-                               pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
+                               pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1);
                                if(!w_issilent)
                                {
                                        if(w_random<0.15)
index 3c40adc316a865bdee0e331c38700c028410680b..a16c2d68ba0c2f922990912972276c7e516b71b1 100644 (file)
@@ -856,7 +856,7 @@ void Net_ReadShockwaveParticle(void)
                        // handled by Net_ReadShockwaveParticle
                        //vector org2;
                        //org2 = w_org + w_backoff * 2;
-                       //pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
+                       //pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
                }
 
 #endif
index 5e4523cdf43036d9ef18db022e3d9962ce22eaf4..da08705eedc48a4d5a5a444226a65e077079c095 100644 (file)
@@ -339,7 +339,7 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, int slot, int fire)
                METHOD(Shotgun, wr_impacteffect, void(entity thiswep))
                {
                        vector org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum(EFFECT_SHOTGUN_IMPACT), org2, w_backoff * 1000, 1);
+                       pointparticles(EFFECT_SHOTGUN_IMPACT, org2, w_backoff * 1000, 1);
                        if(!w_issilent && time - self.prevric > 0.25)
                        {
                                if(w_random < 0.0165)
index f8aceb1070868f59c12e747616333f342e7ff7cc..6830c90016fa0acd5021af517e1a7702e8242111 100644 (file)
@@ -381,12 +381,12 @@ void W_RocketMinsta_Attack3 (void)
                        vector org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
+                               pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
                        }
                        else
                        {
-                               pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
+                               pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); }
                        }
                }
index 584b1a5114f187b74ecf302540460572c6ad2cf4..790d5c2b8c084e5a5b82798159b479b5d5cbe8d5 100644 (file)
@@ -306,7 +306,7 @@ float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO
                METHOD(Vortex, wr_impacteffect, void(entity thiswep))
                {
                        vector org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
+                       pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM);
                }
index 6ad27242aaf3f6a22161d17db4f4e3bd44d3575a..6f9c9d637ff3a927faae655e701e09d7c73d22a9 100644 (file)
@@ -10,6 +10,8 @@
 
 #define spawn _spawn
 #define particleeffectnum _particleeffectnum
+#define trailparticles __trailparticles
+#define pointparticles __pointparticles
 #define setmodel _setmodel
 
 #include "upstream/csprogsdefs.qc"
@@ -21,6 +23,8 @@
 
 #undef spawn
 #undef particleeffectnum
+#undef trailparticles
+#undef pointparticles
 #undef setmodel
 
 #pragma noref 0
index 7b437082f191096ac3aadd7b2bfc6583b50c3eae..ff9214844b3e5c181878b7ef31c40621e85a59e3 100644 (file)
@@ -4,10 +4,14 @@
 #pragma noref 1
 
 #define particleeffectnum __particleeffectnum
+#define trailparticles __trailparticles
+#define pointparticles __pointparticles
 
 #include "upstream/dpextensions.qc"
 
 #undef particleeffectnum
+#undef trailparticles
+#undef pointparticles
 
 int(entity ent, string tagname) _gettagindex = #451;
 #define gettagindex _gettagindex
index 6fe901bd87d3cf7f860be73b05aee99ddfef89aa..a04ee59e4b94642ff3957a12b8623f4d1a2c289f 100644 (file)
@@ -457,7 +457,7 @@ entity WarpZone_TrailParticles_trace_callback_own;
 float WarpZone_TrailParticles_trace_callback_eff;
 void WarpZone_TrailParticles_trace_callback(vector from, vector endpos, vector to)
 {
-       trailparticles(WarpZone_TrailParticles_trace_callback_own, WarpZone_TrailParticles_trace_callback_eff, from, endpos);
+       __trailparticles(WarpZone_TrailParticles_trace_callback_own, WarpZone_TrailParticles_trace_callback_eff, from, endpos);
 }
 
 void WarpZone_TrailParticles(entity own, float eff, vector org, vector end)
index 4b64055814b3ae05ee49888fad7d6974fb9dc9d6..dc6d63b0c863710396bb092f24dbf8211b428bcf 100644 (file)
@@ -338,7 +338,7 @@ float CheatCommand(float argc)
                                effectnum = _particleeffectnum(argv(1));
                                W_SetupShot(self, false, false, "", CH_WEAPON_A, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self);
-                               trailparticles(self, effectnum, w_shotorg, trace_endpos);
+                               __trailparticles(self, effectnum, w_shotorg, trace_endpos);
                                DID_CHEAT();
                                break;
                        }
index c65bd8fa94ab39157fff94068d39c77b4a57a79d..4b972f0dec76304030bde9eb74acafebe96b03a9 100644 (file)
@@ -1665,8 +1665,8 @@ void GameCommand_trace(float request, float argc)
                                                vv = stov(argv(2));
                                                dv = stov(argv(3));
                                                traceline(vv, dv, MOVE_NORMAL, world);
-                                               trailparticles(world, particleeffectnum(EFFECT_TR_NEXUIZPLASMA), vv, trace_endpos);
-                                               trailparticles(world, particleeffectnum(EFFECT_TR_CRYLINKPLASMA), trace_endpos, dv);
+                                               __trailparticles(world, particleeffectnum(EFFECT_TR_NEXUIZPLASMA), vv, trace_endpos);
+                                               __trailparticles(world, particleeffectnum(EFFECT_TR_CRYLINKPLASMA), trace_endpos, dv);
                                                return;
                                        }
                                }
index 5d23ec73b881bda4f2a5ce10a9d97b084fc019ff..78e6430181be8f5a460ac0ba057fd344fa167bcf 100644 (file)
@@ -530,7 +530,7 @@ void ons_ControlPoint_Icon_Damage(entity inflictor, entity attacker, float damag
                WaypointSprite_UpdateBuildFinished(self.owner.sprite, time + (self.max_health - self.health) / (self.count / ONS_CP_THINKRATE));
        self.pain_finished = time + 1;
        // particles on every hit
-       pointparticles(particleeffectnum(EFFECT_SPARKS), hitloc, force*-1, 1);
+       pointparticles(EFFECT_SPARKS, hitloc, force*-1, 1);
        //sound on every hit
        if (random() < 0.5)
                sound(self, CH_TRIGGER, SND_ONS_HIT1, VOL_BASE+0.3, ATTEN_NORM);
@@ -540,7 +540,7 @@ void ons_ControlPoint_Icon_Damage(entity inflictor, entity attacker, float damag
        if (self.health < 0)
        {
                sound(self, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
+               pointparticles(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
                Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(self.team, INFO_ONSLAUGHT_CPDESTROYED_), self.owner.message, attacker.netname);
 
                PlayerScore_Add(attacker, SP_ONS_TAKES, 1);
index 6b7054f956e0e2a99c01f7acbb4df2241070df45..3f57a3bb39a7ae54368cb6609db387700949d38a 100644 (file)
@@ -358,11 +358,11 @@ void fireBullet(vector start, vector dir, float spread, float max_solid_penetrat
        float total_damage = 0;
 
        if(tracereffects & EF_RED)
-               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_RIFLE);
+               fireBullet_trace_callback_eff = EFFECT_RIFLE;
        else if(tracereffects & EF_BLUE)
-               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_RIFLE_WEAK);
+               fireBullet_trace_callback_eff = EFFECT_RIFLE_WEAK;
        else
-               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_BULLET);
+               fireBullet_trace_callback_eff = EFFECT_BULLET;
 
        float lag = ANTILAG_LATENCY(self);
        if(lag < 0.001)
index b2ab7d08222d64b81be935e746e31fab99844766..c4f63835c359f07b9fb8f2ea932c2f89179ebe9c 100644 (file)
@@ -52,7 +52,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p
 .vector railgunforce;
 void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype);
 
-float fireBullet_trace_callback_eff;
+entity fireBullet_trace_callback_eff;
 entity fireBullet_last_hit;
 void fireBullet_trace_callback(vector start, vector hit, vector end);
 void fireBullet(vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, int tracereffects);