]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
De-stringify particle effects
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Aug 2015 12:00:35 +0000 (22:00 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Aug 2015 12:00:35 +0000 (22:00 +1000)
75 files changed:
qcsrc/client/command/cl_cmd.qc
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/client/weapons/projectile.qc
qcsrc/common/effects.inc
qcsrc/common/effects.qc
qcsrc/common/effects.qh
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/pointparticles.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/unit/ewheel.qc
qcsrc/common/turrets/unit/flac.qc
qcsrc/common/turrets/unit/plasma.qc
qcsrc/common/turrets/unit/plasma_dual.qc
qcsrc/common/turrets/unit/walker.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/unit/bumblebee.qc
qcsrc/common/vehicles/unit/racer.qc
qcsrc/common/vehicles/unit/raptor.qc
qcsrc/common/vehicles/unit/spiderbot.qc
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_blaster.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_electro.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_hmg.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_mortar.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_rpc.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/common/weapons/w_shotgun.qc
qcsrc/common/weapons/w_tuba.qc
qcsrc/common/weapons/w_vaporizer.qc
qcsrc/common/weapons/w_vortex.qc
qcsrc/dpdefs/csprogsdefs.qh
qcsrc/dpdefs/dpextensions.qh
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_touchexplode.qc
qcsrc/server/mutators/sandbox.qc
qcsrc/server/portals.qc
qcsrc/server/steerlib.qc
qcsrc/server/t_items.qc
qcsrc/server/weapons/tracing.qc

index b5980e216f1715d88a4af1b17e7bcb2dfd8ef228..34e891cca23b6a617927e6d6c354aceb92f59700 100644 (file)
@@ -82,7 +82,7 @@ void LocalCommand_boxparticles(int request, int argc)
                {
                        if (argc == 9)
                        {
-                               int effect = particleeffectnum(argv(1));
+                               int effect = _particleeffectnum(argv(1));
                                if (effect >= 0)
                                {
                                        int index = stoi(argv(2));
index 49cb1c6a0d562e8173a120ba3de2a3ff65bea595..c3e81478c4f2819c9fe9999a4ad715906e3fcd07 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "../common/animdecide.qh"
 #include "../common/csqcmodel_settings.qh"
+#include "../common/effects.qh"
 #include "../common/teams.qh"
 #include "../common/triggers/trigger/viewloc.qh"
 
@@ -527,7 +528,7 @@ void CSQCModel_Effects_Apply(void)
        self.traileffect = 0;
 
        if(eff & EF_BRIGHTFIELD)
-               self.traileffect = particleeffectnum("TR_NEXUIZPLASMA");
+               self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA);
        // ignoring EF_MUZZLEFLASH
        if(eff & EF_BRIGHTLIGHT)
                adddynamiclight(self.origin, 400, '3 3 3');
@@ -545,9 +546,9 @@ void CSQCModel_Effects_Apply(void)
        if(eff & EF_FULLBRIGHT)
                self.renderflags |= RF_FULLBRIGHT;
        if(eff & EF_FLAME)
-               pointparticles(particleeffectnum("EF_FLAME"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+               pointparticles(particleeffectnum(EFFECT_EF_FLAME), self.origin, '0 0 0', bound(0, frametime, 0.1));
        if(eff & EF_STARDUST)
-               pointparticles(particleeffectnum("EF_STARDUST"), self.origin, '0 0 0', bound(0, frametime, 0.1));
+               pointparticles(particleeffectnum(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)
@@ -561,24 +562,24 @@ void CSQCModel_Effects_Apply(void)
                self.renderflags |= RF_DYNAMICMODELLIGHT;
        // ignoring EF_UNUSED18, EF_UNUSED19, EF_RESTARTANIM_BIT, EF_TELEPORT_BIT, EF_LOWPRECISION
        if(self.csqcmodel_modelflags & MF_ROCKET)
-               self.traileffect = particleeffectnum("TR_ROCKET");
+               self.traileffect = particleeffectnum(EFFECT_TR_ROCKET);
        if(self.csqcmodel_modelflags & MF_GRENADE)
-               self.traileffect = particleeffectnum("TR_GRENADE");
+               self.traileffect = particleeffectnum(EFFECT_TR_GRENADE);
        if(self.csqcmodel_modelflags & MF_GIB)
-               self.traileffect = particleeffectnum("TR_BLOOD");
+               self.traileffect = particleeffectnum(EFFECT_TR_BLOOD);
        if(self.csqcmodel_modelflags & MF_ROTATE)
        {
                self.renderflags |= RF_USEAXIS;
                makevectors(self.angles + '0 100 0' * fmod(time, 3.6));
        }
        if(self.csqcmodel_modelflags & MF_TRACER)
-               self.traileffect = particleeffectnum("TR_WIZSPIKE");
+               self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE);
        if(self.csqcmodel_modelflags & MF_ZOMGIB)
-               self.traileffect = particleeffectnum("TR_SLIGHTBLOOD");
+               self.traileffect = particleeffectnum(EFFECT_TR_SLIGHTBLOOD);
        if(self.csqcmodel_modelflags & MF_TRACER2)
-               self.traileffect = particleeffectnum("TR_KNIGHTSPIKE");
+               self.traileffect = particleeffectnum(EFFECT_TR_KNIGHTSPIKE);
        if(self.csqcmodel_modelflags & MF_TRACER3)
-               self.traileffect = particleeffectnum("TR_VORESPIKE");
+               self.traileffect = particleeffectnum(EFFECT_TR_VORESPIKE);
 
        if(self.drawmask)
                Projectile_DrawTrail(self.origin);
index 5eff455c2f2929a429798a1cd4e964b11c10e1b7..32d236fba4db7a23194ec99e26cc08b38e331e65 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
+#include "../common/effects.qh"
 #include "../common/movetypes/movetypes.qh"
 #include "../common/util.qh"
 
@@ -117,7 +118,7 @@ void DamageEffect(vector hitorg, float thedamage, int type, int specnum)
        e.classname = "damage";
        e.owner = self;
        e.cnt = time + life;
-       e.team = particleeffectnum(effectname);
+       e.team = _particleeffectnum(effectname);
        e.think = DamageEffect_Think;
        e.nextthink = time;
        self.total_damages += 1;
@@ -233,33 +234,33 @@ void Ent_DamageInfo(float isNew)
                                string _snd;
                                _snd = W_Sound(strcat("ric", ftos(1 + rint(random() * 2))));
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("spiderbot_minigun_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_SPIDERBOT_MINIGUN_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_SPID_ROCKET:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("spiderbot_rocket_explode"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_SPIDERBOT_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_SPID_DEATH:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
                                break;
 
                        case DEATH_VH_WAKI_GUN:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RACER_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_WAKI_ROCKET:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("wakizashi_rocket_explode"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RACER_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_WAKI_DEATH:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
                                break;
 
                        case DEATH_VH_RAPT_CANNON:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RAPTOR_CANNON_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_FRAGMENT:
                                float i;
@@ -271,19 +272,19 @@ void Ent_DamageInfo(float isNew)
                                        RaptorCBShellfragToss(w_org, vel, ang + '0 0 1' * (120 * i));
                                }
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RAPTOR_BOMB_SPREAD), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_BOMB:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_RAPTOR_BOMB_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_RAPT_DEATH:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_EXPLOSION_BIG), self.origin, w_backoff * 1000, 1);
                                break;
                        case DEATH_VH_BUMB_GUN:
                                sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("bigplasma_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_BIGPLASMA_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
                }
        }
@@ -304,11 +305,11 @@ void Ent_DamageInfo(float isNew)
                {
                         case DEATH_TURRET_EWHEEL:
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("laser_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_FLAC:
-                               pointparticles(particleeffectnum("hagar_explode"), w_org, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), w_org, '0 0 0', 1);
                                _snd = W_Sound(strcat("hagexp", ftos(1 + rint(random() * 2))));
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
                                break;
@@ -318,24 +319,24 @@ void Ent_DamageInfo(float isNew)
                         case DEATH_TURRET_WALK_ROCKET:
                         case DEATH_TURRET_HELLION:
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("rocket_explode"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_MACHINEGUN:
                         case DEATH_TURRET_WALK_GUN:
                                _snd = W_Sound(strcat("ric", ftos(1 + rint(random() * 2))));
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
-                               pointparticles(particleeffectnum("machinegun_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_PLASMA:
                                sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_WALK_MELEE:
                                sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_MIN);
-                               pointparticles(particleeffectnum("TE_SPARK"), self.origin, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_TE_SPARK), self.origin, w_backoff * 1000, 1);
                                break;
 
                         case DEATH_TURRET_PHASER:
index 46872d8173296c7e810e289a94256ade3b3c7cda..80ccc441bcf01cf0188f4be4cf7b0bd9a7d4205e 100644 (file)
@@ -81,11 +81,11 @@ void generator_draw()
                if(random() < 0.9 - self.health / self.max_health)
                if(random() < 0.01)
                {
-                       pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
+                       pointparticles(particleeffectnum(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);
+                       pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_DAMAGED), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
 
                self.move_time = time + 0.1;
 
@@ -102,7 +102,7 @@ void generator_draw()
        if(self.count==40||self.count==20)
        {
                sound(self, CH_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 6);
+               pointparticles(particleeffectnum(EFFECT_ELECTRO_COMBO), self.origin, '0 0 0', 6);
        }
 
        // rays
@@ -115,7 +115,7 @@ void generator_draw()
        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);
+               pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_GIB), org, '0 0 0', 1);
        }
 
        // Short explosion sound + small explosion
@@ -127,14 +127,14 @@ void generator_draw()
 
        // 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);
+       pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_EXPLODE), org, '0 0 0', 1);
 
        // Final explosion
        if(self.count==1)
        {
                org = self.origin;
                te_explosion(org);
-               pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_ONS_GENERATOR_EXPLODE2), org, '0 0 0', 1);
                sound(self, CH_TRIGGER, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
        }
 
index bdde3b698172c1b4ca08a075d3c0b97817f3e559..b59cd4ff3d50c4d4b80a1722e3a02953ec9bb9ee 100644 (file)
@@ -86,7 +86,7 @@ void Gib_Touch()
 
        if(!self.silent)
                sound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), 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();
 }
@@ -102,9 +102,9 @@ void Gib_Draw()
 
        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), "TR_SLIGHTBLOOD")), 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), "TR_BLOOD")), oldorg, self.origin);
+               trailparticles(self, _particleeffectnum(strcat(species_prefix(self.cnt), EFFECT_TR_BLOOD.eent_eff_name)), oldorg, self.origin);
 
        self.renderflags = 0;
 
@@ -222,7 +222,7 @@ void Ent_GibSplash(bool isNew)
 
                        if(prandom() < amount)
                                TossGib ("models/gibs/eye.md3", org, org, vel, prandomvec() * 150, specnum, 0, issilent);
-                       new_te_bloodshower(particleeffectnum(strcat(specstr, "bloodshower")), org, 1200, amount);
+                       new_te_bloodshower(_particleeffectnum(strcat(specstr, "bloodshower")), org, 1200, amount);
                        if(prandom() < amount)
                                TossGib ("models/gibs/bloodyskull.md3", org, org + 16 * prandomvec(), vel, prandomvec() * 100, specnum, 0, issilent);
 
@@ -255,17 +255,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 ce6ca92b5f4ec0c1b774c32540aefcf7bc10d4fe..a30ab73c16e357a3972d923c87a43aa5a6623bc4 100644 (file)
@@ -161,7 +161,7 @@ void Draw_GrapplingHook()
                case ENT_CLIENT_HOOK:
                        break;
                case ENT_CLIENT_ARC_BEAM:
-                       pointparticles(particleeffectnum("electro_lightning"), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
+                       pointparticles(particleeffectnum(EFFECT_ARC_LIGHTNING2), trace_endpos, normalize(atrans - trace_endpos), frametime * intensity); // todo: new effect
                        break;
        }
 }
index 85aae33c48fcfae4085b7d51fac11cc2342f0967..6f40c3970d5b902156abc73521b10dc62e091dd2 100644 (file)
@@ -148,7 +148,6 @@ void CSQC_Init(void)
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
        CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
-       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        initialize_minigames();
 
@@ -727,14 +726,14 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
                        {
                                switch(teamnum)
                                {
-                                       case NUM_TEAM_1: self.cnt = particleeffectnum("spawn_point_red"); break;
-                                       case NUM_TEAM_2: self.cnt = particleeffectnum("spawn_point_blue"); break;
-                                       case NUM_TEAM_3: self.cnt = particleeffectnum("spawn_point_yellow"); break;
-                                       case NUM_TEAM_4: self.cnt = particleeffectnum("spawn_point_pink"); break;
-                                       default: self.cnt = particleeffectnum("spawn_point_neutral"); break;
+                                       case NUM_TEAM_1: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_RED); break;
+                                       case NUM_TEAM_2: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_BLUE); break;
+                                       case NUM_TEAM_3: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_YELLOW); break;
+                                       case NUM_TEAM_4: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_PINK); break;
+                                       default: self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_NEUTRAL); break;
                                }
                        }
-                       else { self.cnt = particleeffectnum("spawn_point_neutral"); }
+                       else { self.cnt = particleeffectnum(EFFECT_SPAWNPOINT_NEUTRAL); }
 
                        self.draw = Spawn_Draw;
                }
@@ -764,11 +763,11 @@ void Ent_ReadSpawnEvent(float is_new)
                        {
                                switch(teamnum)
                                {
-                                       case NUM_TEAM_1: pointparticles(particleeffectnum("spawn_event_red"), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_2: pointparticles(particleeffectnum("spawn_event_blue"), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_3: pointparticles(particleeffectnum("spawn_event_yellow"), self.origin, '0 0 0', 1); break;
-                                       case NUM_TEAM_4: pointparticles(particleeffectnum("spawn_event_pink"), self.origin, '0 0 0', 1); break;
-                                       default: pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); break;
+                                       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;
                                }
                        }
                        if(autocvar_cl_spawn_event_sound)
index e997d15600f835a1b40de4fac68618374d301886..6d73e24b0bb514f323706a1d75b45610d7fe0a52 100644 (file)
@@ -14,14 +14,14 @@ void Net_ReadVortexBeamParticle()
        endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
        charge = ReadByte() / 255.0;
 
-       pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
+       pointparticles(particleeffectnum(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
        particles_alphamin = particles_alphamax = particles_fade = charge;
 
        if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
-               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
        else
-               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+               WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
 }
index 12f1714bfb6aaedb808c4af86f17ec37bcc72490..90d3a29e68a2b7bef80f7688945f2bad59109c31 100644 (file)
@@ -279,43 +279,43 @@ void Ent_Projectile()
                self.traileffect = 0;
                switch(self.cnt)
                {
-                       case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); self.scale = 2; break;
-                       case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-                       case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-                       case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
-                       case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
-                       case PROJECTILE_MINE: setmodel(self, "models/mine.md3");self.traileffect = particleeffectnum("TR_GRENADE"); break;
-                       case PROJECTILE_BLASTER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_PORTO_RED: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_WIZSPIKE"); self.scale = 4; break;
-                       case PROJECTILE_PORTO_BLUE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_WIZSPIKE"); self.scale = 4; break;
-                       case PROJECTILE_HOOKBOMB: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum("TR_KNIGHTSPIKE"); break;
-                       case PROJECTILE_HAGAR: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum("tr_hagar"); self.scale = 0.75; break;
-                       case PROJECTILE_HAGAR_BOUNCING: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum("tr_hagar"); self.scale = 0.75; break;
-                       case PROJECTILE_NAPALM_FOUNTAIN: //self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum("torch_small"); break;
-                       case PROJECTILE_FIREBALL: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum("fireball"); break; // particle effect is good enough
-                       case PROJECTILE_FIREMINE: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum("firemine"); break; // particle effect is good enough
-                       case PROJECTILE_TAG: setmodel(self, "models/laser.mdl"); self.traileffect = particleeffectnum("TR_ROCKET"); break;
-                       case PROJECTILE_FLAC: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; self.traileffect = particleeffectnum("TR_SEEKER"); break;
-                       case PROJECTILE_SEEKER: setmodel(self, "models/tagrocket.md3"); self.traileffect = particleeffectnum("TR_SEEKER"); break;
-
-                       case PROJECTILE_MAGE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum("TR_VORESPIKE"); break;
-                       case PROJECTILE_SHAMBLER_LIGHTNING: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-
-                       case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(""); break;
-                       case PROJECTILE_RAPTORCANNON:  setmodel(self, "models/plasmatrail.mdl"); self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
-
-                       case PROJECTILE_SPIDERROCKET: setmodel(self, "models/vehicles/rocket02.md3"); self.traileffect = particleeffectnum("spiderbot_rocket_thrust"); break;
-                       case PROJECTILE_WAKIROCKET:   setmodel(self, "models/vehicles/rocket01.md3");  self.traileffect = particleeffectnum("wakizashi_rocket_thrust"); break;
-                       case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(""); break;
-
-                       case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-
-                       case PROJECTILE_RPC: setmodel(self, W_Model("ok_rocket"));self.traileffect = particleeffectnum("TR_ROCKET"); break;
+                       case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+                       case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum(EFFECT_TR_ROCKET); self.scale = 2; break;
+                       case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
+                       case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
+                       case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+                       case PROJECTILE_GRENADE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
+                       case PROJECTILE_GRENADE_BOUNCING: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
+                       case PROJECTILE_MINE: setmodel(self, "models/mine.md3");self.traileffect = particleeffectnum(EFFECT_TR_GRENADE); break;
+                       case PROJECTILE_BLASTER: setmodel(self, "models/laser.mdl");self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_HLAC: setmodel(self, "models/hlac_bullet.md3");self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_PORTO_RED: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE); self.scale = 4; break;
+                       case PROJECTILE_PORTO_BLUE: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_WIZSPIKE); self.scale = 4; break;
+                       case PROJECTILE_HOOKBOMB: setmodel(self, "models/grenademodel.md3");self.traileffect = particleeffectnum(EFFECT_TR_KNIGHTSPIKE); break;
+                       case PROJECTILE_HAGAR: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum(EFFECT_HAGAR_ROCKET); self.scale = 0.75; break;
+                       case PROJECTILE_HAGAR_BOUNCING: setmodel(self, "models/hagarmissile.mdl");self.traileffect = particleeffectnum(EFFECT_HAGAR_ROCKET); self.scale = 0.75; break;
+                       case PROJECTILE_NAPALM_FOUNTAIN: //self.model = ""; self.modelindex = 0; self.traileffect = _particleeffectnum("torch_small"); break;
+                       case PROJECTILE_FIREBALL: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum(EFFECT_FIREBALL); break; // particle effect is good enough
+                       case PROJECTILE_FIREMINE: self.model = ""; self.modelindex = 0; self.traileffect = particleeffectnum(EFFECT_FIREMINE); break; // particle effect is good enough
+                       case PROJECTILE_TAG: setmodel(self, "models/laser.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_ROCKET); break;
+                       case PROJECTILE_FLAC: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; self.traileffect = particleeffectnum(EFFECT_FLAC_TRAIL); break;
+                       case PROJECTILE_SEEKER: setmodel(self, "models/tagrocket.md3"); self.traileffect = particleeffectnum(EFFECT_SEEKER_TRAIL); break;
+
+                       case PROJECTILE_MAGE_SPIKE: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_VORESPIKE); break;
+                       case PROJECTILE_SHAMBLER_LIGHTNING: setmodel(self, "models/ebomb.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+
+                       case PROJECTILE_RAPTORBOMB:    setmodel(self, "models/vehicles/clusterbomb.md3"); self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_RAPTORBOMBLET: setmodel(self, "models/vehicles/bomblet.md3");     self.gravity = 1; self.avelocity = '0 0 180'; self.traileffect = particleeffectnum(EFFECT_NULL); break;
+                       case PROJECTILE_RAPTORCANNON:  setmodel(self, "models/plasmatrail.mdl"); self.traileffect = particleeffectnum(EFFECT_TR_CRYLINKPLASMA); break;
+
+                       case PROJECTILE_SPIDERROCKET: setmodel(self, "models/vehicles/rocket02.md3"); self.traileffect = particleeffectnum(EFFECT_SPIDERBOT_ROCKET_TRAIL); break;
+                       case PROJECTILE_WAKIROCKET:   setmodel(self, "models/vehicles/rocket01.md3");  self.traileffect = particleeffectnum(EFFECT_RACER_ROCKET_TRAIL); break;
+                       case PROJECTILE_WAKICANNON:   setmodel(self, "models/laser.mdl");  self.traileffect = particleeffectnum(EFFECT_NULL); break;
+
+                       case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+                       case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum(EFFECT_TR_NEXUIZPLASMA); break;
+
+                       case PROJECTILE_RPC: setmodel(self, W_Model("ok_rocket"));self.traileffect = particleeffectnum(EFFECT_TR_ROCKET); break;
 
                        default:
                                if(MUTATOR_CALLHOOK(Ent_Projectile, self))
@@ -324,7 +324,7 @@ void Ent_Projectile()
                                if (Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
                                {
                                        setmodel(self, W_Model("v_ok_grenade"));
-                                       self.traileffect = particleeffectnum(Nade_TrailEffect(self.cnt, self.team));
+                                       self.traileffect = _particleeffectnum(Nade_TrailEffect(self.cnt, self.team));
                                        break;
                                }
                                error("Received invalid CSQC projectile, can't work with this!");
index 0d74328405523f71e1cec75174c3001c5d510e5c..8cd4d4995bb3f1525382a44d65000260ca4e6c18 100644 (file)
 // Global list of effects, networked to CSQC by ID to save bandwidth and to use client particle numbers (allows mismatching effectinfos to some degree)
 // Not too concerned about the order of this list, just keep the weapon effects together!
 
-// EFFECT(istrail, EFFECT_NAME,             "effectinfo_string")
-EFFECT(0, EFFECT_EXPLOSION_SMALL,           "explosion_small")
-EFFECT(0, EFFECT_EXPLOSION_MEDIUM,          "explosion_medium")
-EFFECT(0, EFFECT_EXPLOSION_BIG,             "explosion_big")
-EFFECT(1, EFFECT_VAPORIZER_RED,             "TE_TEI_G3RED")
-EFFECT(1, EFFECT_VAPORIZER_RED_HIT,         "TE_TEI_G3RED_HIT")
-EFFECT(1, EFFECT_VAPORIZER_BLUE,            "TE_TEI_G3BLUE")
-EFFECT(1, EFFECT_VAPORIZER_BLUE_HIT,        "TE_TEI_G3BLUE_HIT")
-EFFECT(1, EFFECT_VAPORIZER_YELLOW,          "TE_TEI_G3YELLOW")
-EFFECT(1, EFFECT_VAPORIZER_YELLOW_HIT,      "TE_TEI_G3YELLOW_HIT")
-EFFECT(1, EFFECT_VAPORIZER_PINK,            "TE_TEI_G3PINK")
-EFFECT(1, EFFECT_VAPORIZER_PINK_HIT,        "TE_TEI_G3PINK_HIT")
-EFFECT(1, EFFECT_VAPORIZER_NEUTRAL,         "TE_TEI_G3NEUTRAL")
-EFFECT(1, EFFECT_VAPORIZER_NEUTRAL_HIT,     "TE_TEI_G3NEUTRAL_HIT")
-EFFECT(0, EFFECT_ELECTRO_COMBO,             "electro_combo")
-EFFECT(0, EFFECT_ELECTRO_IMPACT,            "electro_impact")
-EFFECT(0, EFFECT_ELECTRO_MUZZLEFLASH,       "electro_muzzleflash")
-EFFECT(0, EFFECT_HAGAR_BOUNCE,              "hagar_bounce")
-EFFECT(0, EFFECT_HAGAR_MUZZLEFLASH,         "hagar_muzzleflash")
-EFFECT(0, EFFECT_LASER_MUZZLEFLASH,         "laser_muzzleflash")
-EFFECT(0, EFFECT_MACHINEGUN_MUZZLEFLASH,    "uzi_muzzleflash")
-EFFECT(0, EFFECT_RIFLE_MUZZLEFLASH,         "rifle_muzzleflash")
-EFFECT(0, EFFECT_RAPTOR_MUZZLEFLASH,        "raptor_cannon_muzzleflash")
-EFFECT(0, EFFECT_RACER_MUZZLEFLASH,         "wakizashi_gun_muzzleflash")
-EFFECT(0, EFFECT_RACER_ROCKETLAUNCH,        "wakizashi_rocket_launch")
-EFFECT(0, EFFECT_SPIDERBOT_ROCKETLAUNCH,    "spiderbot_rocket_launch")
-EFFECT(0, EFFECT_BIGPLASMA_MUZZLEFLASH,     "bigplasma_muzzleflash")
-EFFECT(1, EFFECT_RIFLE,                     "tr_rifle")
-EFFECT(1, EFFECT_RIFLE_WEAK,                "tr_rifle_weak")
-EFFECT(0, EFFECT_SEEKER_MUZZLEFLASH,        "seeker_muzzleflash")
-EFFECT(0, EFFECT_SHOTGUN_MUZZLEFLASH,       "shotgun_muzzleflash")
-EFFECT(0, EFFECT_GRENADE_MUZZLEFLASH,       "grenadelauncher_muzzleflash")
-EFFECT(0, EFFECT_GRENADE_EXPLODE,           "grenade_explode")
-EFFECT(0, EFFECT_FLAK_BOUNCE,               "flak_bounce")
-EFFECT(0, EFFECT_CRYLINK_JOINEXPLODE,       "crylink_joinexplode")
-EFFECT(0, EFFECT_CRYLINK_MUZZLEFLASH,       "crylink_muzzleflash")
-EFFECT(0, EFFECT_VORTEX_MUZZLEFLASH,        "nex_muzzleflash")
-EFFECT(0, EFFECT_HOOK_MUZZLEFLASH,          "grapple_muzzleflash")
-EFFECT(0, EFFECT_HOOK_IMPACT,               "grapple_impact")
-EFFECT(0, EFFECT_ROCKET_EXPLODE,            "rocket_explode")
-EFFECT(0, EFFECT_ROCKET_GUIDE,              "rocket_guide")
-EFFECT(0, EFFECT_ROCKET_MUZZLEFLASH,        "rocketlauncher_muzzleflash")
-EFFECT(0, EFFECT_FIREBALL_LASER,            "fireball_laser")
-EFFECT(0, EFFECT_FIREBALL_EXPLODE,          "fireball_explode")
-EFFECT(0, EFFECT_FIREBALL_BFGDAMAGE,        "fireball_bfgdamage")
-EFFECT(0, EFFECT_FIREBALL_MUZZLEFLASH,      "fireball_muzzleflash")
-EFFECT(0, EFFECT_FIREBALL_PRE_MUZZLEFLASH,  "fireball_preattack_muzzleflash")
-EFFECT(0, EFFECT_TELEPORT,                  "teleport")
-EFFECT(0, EFFECT_SPAWN_RED,                 "spawn_event_red")
-EFFECT(0, EFFECT_SPAWN_BLUE,                "spawn_event_blue")
-EFFECT(0, EFFECT_SPAWN_YELLOW,              "spawn_event_yellow")
-EFFECT(0, EFFECT_SPAWN_PINK,                "spawn_event_pink")
-EFFECT(0, EFFECT_SPAWN_NEUTRAL,             "spawn_event_neutral")
-EFFECT(0, EFFECT_NADE_RED_EXPLODE,          "nade_red_explode")
-EFFECT(0, EFFECT_NADE_BLUE_EXPLODE,         "nade_blue_explode")
-EFFECT(0, EFFECT_NADE_YELLOW_EXPLODE,       "nade_yellow_explode")
-EFFECT(0, EFFECT_NADE_PINK_EXPLODE,         "nade_pink_explode")
-EFFECT(0, EFFECT_NADE_NEUTRAL_EXPLODE,      "nade_neutral_explode")
-EFFECT(0, EFFECT_ICEORGLASS,                "iceorglass")
-EFFECT(0, EFFECT_ICEFIELD,                  "icefield")
-EFFECT(0, EFFECT_FIREFIELD,                 "firefield")
-EFFECT(0, EFFECT_HEALING,                   "healing_fx")
-EFFECT(1, EFFECT_LASER_BEAM_FAST,           "nex242_misc_laser_beam_fast")
-EFFECT(0, EFFECT_RESPAWN_GHOST,             "respawn_ghost")
-EFFECT(0, EFFECT_FLAG_RED_TOUCH,            "redflag_touch")
-EFFECT(0, EFFECT_FLAG_BLUE_TOUCH,           "blueflag_touch")
-EFFECT(0, EFFECT_FLAG_YELLOW_TOUCH,         "yellowflag_touch")
-EFFECT(0, EFFECT_FLAG_PINK_TOUCH,           "pinkflag_touch")
-EFFECT(0, EFFECT_FLAG_NEUTRAL_TOUCH,        "neutralflag_touch")
-EFFECT(1, EFFECT_RED_PASS,                  "red_pass")
-EFFECT(1, EFFECT_BLUE_PASS,                 "blue_pass")
-EFFECT(1, EFFECT_YELLOW_PASS,               "yellow_pass")
-EFFECT(1, EFFECT_PINK_PASS,                 "pink_pass")
-EFFECT(1, EFFECT_NEUTRAL_PASS,              "neutral_pass")
-EFFECT(0, EFFECT_RED_CAP,                   "red_cap")
-EFFECT(0, EFFECT_BLUE_CAP,                  "blue_cap")
-EFFECT(0, EFFECT_YELLOW_CAP,                "yellow_cap")
-EFFECT(0, EFFECT_PINK_CAP,                  "pink_cap")
-EFFECT(0, EFFECT_BALL_SPARKS,               "kaball_sparks")
-EFFECT(0, EFFECT_ELECTRIC_SPARKS,           "electricity_sparks")
-EFFECT(0, EFFECT_SPARKS,                    "sparks")
-EFFECT(0, EFFECT_RAGE,                      "rage")
-EFFECT(0, EFFECT_SMOKING,                   "smoking")
-EFFECT(0, EFFECT_SMOKE_RING,                "smoke_ring")
-EFFECT(0, EFFECT_ITEM_PICKUP,               "item_pickup")
-EFFECT(0, EFFECT_ITEM_RESPAWN,              "item_respawn")
-EFFECT(0, EFFECT_JUMPPAD,                   "jumppad_activate")
-EFFECT(1, EFFECT_BULLET,                    "tr_bullet")
+// EFFECT(istrail, EFFECT_NAME,     "effectinfo_string")
+EFFECT(0, EXPLOSION_SMALL,          "explosion_small")
+EFFECT(0, EXPLOSION_MEDIUM,         "explosion_medium")
+EFFECT(0, EXPLOSION_BIG,            "explosion_big")
+
+EFFECT(0, SMOKE_SMALL,              "smoke_small")
+EFFECT(0, SMOKE_LARGE,              "smoke_large")
+
+
+
+EFFECT(0, BLASTER_IMPACT,           "laser_impact")
+EFFECT(0, BLASTER_MUZZLEFLASH,      "laser_muzzleflash")
+
+EFFECT(0, SHOTGUN_IMPACT,           "shotgun_impact")
+EFFECT(0, SHOTGUN_MUZZLEFLASH,      "shotgun_muzzleflash")
+
+EFFECT(0, ARC_BEAM,                 "arc_beam")
+EFFECT(0, ARC_BEAM_HEAL,            "arc_beam_heal")
+EFFECT(0, ARC_BEAM_HEAL_IMPACT,     "arc_beam_healimpact")
+EFFECT(0, ARC_BEAM_HEAL_IMPACT2,    "healray_impact")
+EFFECT(0, ARC_LIGHTNING,            "arc_lightning")
+EFFECT(0, ARC_LIGHTNING2,           "electro_lightning")
+
+EFFECT(0, MACHINEGUN_IMPACT,        "machinegun_impact")
+EFFECT(0, MACHINEGUN_MUZZLEFLASH,   "uzi_muzzleflash")
+
+EFFECT(0, GRENADE_EXPLODE,          "grenade_explode")
+EFFECT(0, GRENADE_MUZZLEFLASH,      "grenadelauncher_muzzleflash")
+
+EFFECT(0, ELECTRO_BALLEXPLODE,      "electro_ballexplode")
+EFFECT(0, ELECTRO_COMBO,            "electro_combo")
+EFFECT(0, ELECTRO_IMPACT,           "electro_impact")
+EFFECT(0, ELECTRO_MUZZLEFLASH,      "electro_muzzleflash")
+
+EFFECT(0, CRYLINK_IMPACT,           "crylink_impactbig")
+EFFECT(0, CRYLINK_IMPACT2,          "crylink_impact")
+EFFECT(0, CRYLINK_JOINEXPLODE,      "crylink_joinexplode")
+EFFECT(0, CRYLINK_MUZZLEFLASH,      "crylink_muzzleflash")
+
+EFFECT(0, VORTEX_BEAM,              "nex_beam")
+EFFECT(0, VORTEX_BEAM_OLD,          "TE_TEI_G3")
+EFFECT(0, VORTEX_IMPACT,            "nex_impact")
+EFFECT(0, VORTEX_MUZZLEFLASH,       "nex_muzzleflash")
+
+EFFECT(1, VAPORIZER_RED,            "TE_TEI_G3RED")
+EFFECT(1, VAPORIZER_RED_HIT,        "TE_TEI_G3RED_HIT")
+EFFECT(1, VAPORIZER_BLUE,           "TE_TEI_G3BLUE")
+EFFECT(1, VAPORIZER_BLUE_HIT,       "TE_TEI_G3BLUE_HIT")
+EFFECT(1, VAPORIZER_YELLOW,         "TE_TEI_G3YELLOW")
+EFFECT(1, VAPORIZER_YELLOW_HIT,     "TE_TEI_G3YELLOW_HIT")
+EFFECT(1, VAPORIZER_PINK,           "TE_TEI_G3PINK")
+EFFECT(1, VAPORIZER_PINK_HIT,       "TE_TEI_G3PINK_HIT")
+EFFECT(1, VAPORIZER_NEUTRAL,        "TE_TEI_G3")
+EFFECT(1, VAPORIZER_NEUTRAL_HIT,    "TE_TEI_G3_HIT")
+
+EFFECT(0, RIFLE_IMPACT,             "machinegun_impact")
+EFFECT(0, RIFLE_MUZZLEFLASH,        "rifle_muzzleflash")
+EFFECT(1, RIFLE,                    "tr_rifle")
+EFFECT(1, RIFLE_WEAK,               "tr_rifle_weak")
+
+EFFECT(0, HAGAR_BOUNCE,             "hagar_bounce")
+EFFECT(0, HAGAR_EXPLODE,            "hagar_explode")
+EFFECT(0, HAGAR_MUZZLEFLASH,        "hagar_muzzleflash")
+EFFECT(1, HAGAR_ROCKET,             "tr_hagar")
+
+EFFECT(0, ROCKET_EXPLODE,           "rocket_explode")
+EFFECT(0, ROCKET_GUIDE,             "rocket_guide")
+EFFECT(0, ROCKET_MUZZLEFLASH,       "rocketlauncher_muzzleflash")
+
+EFFECT(0, HOOK_EXPLODE,             "hookbomb_explode")
+EFFECT(0, HOOK_IMPACT,              "grapple_impact")
+EFFECT(0, HOOK_MUZZLEFLASH,         "grapple_muzzleflash")
+
+EFFECT(0, SEEKER_MUZZLEFLASH,       "seeker_muzzleflash")
+
+EFFECT(0, FLAK_BOUNCE,              "flak_bounce")
+
+EFFECT(1, FIREBALL,                 "fireball")
+EFFECT(0, FIREBALL_BFGDAMAGE,       "fireball_bfgdamage")
+EFFECT(0, FIREBALL_EXPLODE,         "fireball_explode")
+EFFECT(0, FIREBALL_LASER,           "fireball_laser")
+EFFECT(0, FIREBALL_MUZZLEFLASH,     "fireball_muzzleflash")
+EFFECT(0, FIREBALL_PRE_MUZZLEFLASH, "fireball_preattack_muzzleflash")
+
+
+
+EFFECT(0, RAPTOR_CANNON_IMPACT,     "raptor_cannon_impact")
+EFFECT(0, RAPTOR_BOMB_IMPACT,       "raptor_bomb_impact")
+EFFECT(0, RAPTOR_BOMB_SPREAD,       "raptor_bomb_spread")
+EFFECT(0, RAPTOR_MUZZLEFLASH,       "raptor_cannon_muzzleflash")
+
+EFFECT(0, RACER_BOOSTER,            "wakizashi_booster_smoke")
+EFFECT(0, RACER_IMPACT,             "wakizashi_gun_impact")
+EFFECT(0, RACER_MUZZLEFLASH,        "wakizashi_gun_muzzleflash")
+EFFECT(0, RACER_ROCKETLAUNCH,       "wakizashi_rocket_launch")
+EFFECT(0, RACER_ROCKET_EXPLODE,     "wakizashi_rocket_launch")
+EFFECT(1, RACER_ROCKET_TRAIL,       "wakizashi_rocket_thrust")
+
+EFFECT(0, SPIDERBOT_ROCKETLAUNCH,   "spiderbot_rocket_launch")
+EFFECT(1, SPIDERBOT_ROCKET_TRAIL,   "spiderbot_rocket_thrust")
+EFFECT(0, SPIDERBOT_ROCKET_EXPLODE, "spiderbot_rocket_explode")
+EFFECT(0, SPIDERBOT_MINIGUN_IMPACT, "spiderbot_minigun_impact")
+EFFECT(0, SPIDERBOT_MINIGUN_MUZZLEFLASH,    "spiderbot_minigun_muzzleflash")
+
+EFFECT(0, BUMBLEBEE_HEAL_MUZZLEFLASH,   "healray_muzzleflash")
+EFFECT(0, BUMBLEBEE_HEAL_IMPACT,   "healray_impact")
+
+EFFECT(0, BIGPLASMA_IMPACT,         "bigplasma_impact")
+EFFECT(0, BIGPLASMA_MUZZLEFLASH,    "bigplasma_muzzleflash")
+
+EFFECT(0, TELEPORT,                 "teleport")
+
+EFFECT(0, SPAWNPOINT_RED,           "spawn_point_red")
+EFFECT(0, SPAWN_RED,                "spawn_event_red")
+EFFECT(0, SPAWNPOINT_BLUE,          "spawn_point_blue")
+EFFECT(0, SPAWN_BLUE,               "spawn_event_blue")
+EFFECT(0, SPAWNPOINT_YELLOW,        "spawn_point_yellow")
+EFFECT(0, SPAWN_YELLOW,             "spawn_event_yellow")
+EFFECT(0, SPAWNPOINT_PINK,          "spawn_point_pink")
+EFFECT(0, SPAWN_PINK,               "spawn_event_pink")
+EFFECT(0, SPAWNPOINT_NEUTRAL,       "spawn_point_neutral")
+EFFECT(0, SPAWN_NEUTRAL,            "spawn_event_neutral")
+
+EFFECT(0, NADE_RED_EXPLODE,         "nade_red_explode")
+EFFECT(0, NADE_BLUE_EXPLODE,        "nade_blue_explode")
+EFFECT(0, NADE_YELLOW_EXPLODE,      "nade_yellow_explode")
+EFFECT(0, NADE_PINK_EXPLODE,        "nade_pink_explode")
+EFFECT(0, NADE_NEUTRAL_EXPLODE,     "nade_neutral_explode")
+
+EFFECT(0, ICEORGLASS,               "iceorglass")
+EFFECT(0, ICEFIELD,                 "icefield")
+EFFECT(0, FIREFIELD,                "firefield")
+EFFECT(0, HEALING,                  "healing_fx")
+EFFECT(1, LASER_BEAM_FAST,          "nex242_misc_laser_beam_fast")
+EFFECT(0, RESPAWN_GHOST,            "respawn_ghost")
+
+EFFECT(0, FLAG_RED_TOUCH,           "redflag_touch")
+EFFECT(0, FLAG_BLUE_TOUCH,          "blueflag_touch")
+EFFECT(0, FLAG_YELLOW_TOUCH,        "yellowflag_touch")
+EFFECT(0, FLAG_PINK_TOUCH,          "pinkflag_touch")
+EFFECT(0, FLAG_NEUTRAL_TOUCH,       "neutralflag_touch")
+EFFECT(1, RED_PASS,                 "red_pass")
+EFFECT(1, BLUE_PASS,                "blue_pass")
+EFFECT(1, YELLOW_PASS,              "yellow_pass")
+EFFECT(1, PINK_PASS,                "pink_pass")
+EFFECT(1, NEUTRAL_PASS,             "neutral_pass")
+EFFECT(0, RED_CAP,                  "red_cap")
+EFFECT(0, BLUE_CAP,                 "blue_cap")
+EFFECT(0, YELLOW_CAP,               "yellow_cap")
+EFFECT(0, PINK_CAP,                 "pink_cap")
+
+EFFECT(0, ITEM_PICKUP,              "item_pickup")
+EFFECT(0, ITEM_RESPAWN,             "item_respawn")
+
+EFFECT(0, ONS_GENERATOR_DAMAGED,    "torch_small")
+EFFECT(0, ONS_GENERATOR_GIB,        "onslaught_generator_gib_explode")
+EFFECT(0, ONS_GENERATOR_EXPLODE,    "onslaught_generator_smallexplosion")
+EFFECT(0, ONS_GENERATOR_EXPLODE2,   "onslaught_generator_finalexplosion")
+
+
+
+EFFECT(0, LASER_DEADLY,             "laser_deadly")
+EFFECT(1, FLAC_TRAIL,               "TR_SEEKER")
+EFFECT(1, SEEKER_TRAIL,             "TR_SEEKER")
+EFFECT(1, FIREMINE,                 "firemine")
+EFFECT(0, BALL_SPARKS,              "kaball_sparks")
+EFFECT(0, ELECTRIC_SPARKS,          "electricity_sparks")
+EFFECT(0, SPARKS,                   "sparks")
+EFFECT(0, RAGE,                     "rage")
+EFFECT(0, SMOKING,                  "smoking")
+EFFECT(0, SMOKE_RING,               "smoke_ring")
+EFFECT(0, JUMPPAD,                  "jumppad_activate")
+EFFECT(1, BULLET,                   "tr_bullet")
+EFFECT(0, EF_FLAME,                 "EF_FLAME")
+EFFECT(0, EF_STARDUST,              "EF_STARDUST")
+EFFECT(0, TE_EXPLOSION,             "TE_EXPLOSION")
+EFFECT(1, TR_NEXUIZPLASMA,          "TR_NEXUIZPLASMA")
+EFFECT(1, TR_CRYLINKPLASMA,         "TR_CRYLINKPLASMA")
+EFFECT(1, TR_ROCKET,                "TR_ROCKET")
+EFFECT(1, TR_GRENADE,               "TR_GRENADE")
+EFFECT(1, TR_BLOOD,                 "TR_BLOOD")
+EFFECT(1, TR_WIZSPIKE,              "TR_WIZSPIKE")
+EFFECT(1, TR_SLIGHTBLOOD,           "TR_SLIGHTBLOOD")
+EFFECT(1, TR_KNIGHTSPIKE,           "TR_KNIGHTSPIKE")
+EFFECT(1, TR_VORESPIKE,             "TR_VORESPIKE")
+EFFECT(0, TE_SPARK,                 "TE_SPARK")
index 349fdffbfb4b4958238ef5be082c46b797c4a9a1..e1707021ea2f8231f46ad0a3c993b221a04bb9fb 100644 (file)
@@ -1,14 +1,3 @@
-void Create_Effect_Entity(int eff_name, string eff_string, bool eff_trail)
-{
-       entity eff;
-       effects_ent[eff_name - 1] = eff = spawn();
-
-       eff.classname = "effect_entity";
-       eff.eent_net_name = eff_name;
-       eff.eent_eff_name = eff_string;
-       eff.eent_eff_trail = eff_trail;
-}
-
 #ifdef CSQC
 void Read_Effect(bool is_new)
 {
@@ -18,7 +7,7 @@ void Read_Effect(bool is_new)
        int net_name = ReadByte();
 #endif
 
-       entity eff = effects_ent[net_name - 1];
+       entity eff = effects_ent[net_name];
 
        vector v, vel = '0 0 0';
        int eff_cnt = 1;
@@ -41,9 +30,9 @@ void Read_Effect(bool is_new)
        if(is_new)
        {
                if(eff_trail)
-                       WarpZone_TrailParticles(world, particleeffectnum(eff.eent_eff_name), v, vel);
+                       WarpZone_TrailParticles(world, particleeffectnum(eff), v, vel);
                else
-                       pointparticles(particleeffectnum(eff.eent_eff_name), v, vel, eff_cnt);
+                       pointparticles(particleeffectnum(eff), v, vel, eff_cnt);
        }
 }
 #endif
@@ -53,9 +42,9 @@ bool Net_Write_Effect(entity client, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_EFFECT);
 #if EFFECTS_COUNT >= 255
-       WriteShort(MSG_ENTITY, self.eent_net_name);
+       WriteShort(MSG_ENTITY, self.m_id);
 #else
-       WriteByte(MSG_ENTITY, self.eent_net_name);
+       WriteByte(MSG_ENTITY, self.m_id);
 #endif
        WriteCoord(MSG_ENTITY, self.eent_net_location_x);
        WriteCoord(MSG_ENTITY, self.eent_net_location_y);
@@ -75,38 +64,15 @@ bool Net_Write_Effect(entity client, int sf)
        return true;
 }
 
-// problem with this is, we might not have all the available effects for it
-int Effect_NameToID(string eff_name)
-{
-       int i;
-       for(i = EFFECT_FIRST; i < MAX_EFFECTS; ++i)
-       {
-               if((effects_ent[i - 1]).eent_eff_name == eff_name)
-                       return (effects_ent[i - 1]).eent_net_name;
-       }
-
-       return 0;
-}
-
-void Send_Effect(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
+void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
 {
-       int eff_id = Effect_NameToID(eff_name);
-
-       if(!eff_id)
-       {
-               // revert to engine handling?
-               pointparticles(particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
-               return;
-       }
-
-       entity eff = effects_ent[eff_id - 1];
        if(!eff) { return; }
        if(!eff.eent_eff_trail && !eff_cnt) { return; } // effect has no count!
        entity net_eff = spawn();
        net_eff.owner = eff;
        net_eff.classname = "net_effect";
        //net_eff.eent_broadcast = broadcast;
-       net_eff.eent_net_name = eff_id;
+       net_eff.m_id = eff.m_id;
        net_eff.eent_net_velocity = eff_vel;
        net_eff.eent_net_location = eff_loc;
        net_eff.eent_net_count = eff_cnt;
@@ -117,4 +83,15 @@ void Send_Effect(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
 
        Net_LinkEntity(net_eff, false, 0, Net_Write_Effect);
 }
+
+void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
+{
+       // problem with this is, we might not have all the available effects for it
+       FOREACH(effects_ent, it.eent_eff_name == eff_name, LAMBDA(
+               Send_Effect(it, eff_loc, eff_vel, eff_cnt);
+               return;
+       ));
+       // revert to engine handling
+       pointparticles(_particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
+}
 #endif
index 1889f7b42029ece7aff207b5c008b145c6e8fef1..b72eab243dad90a1a4f88e0e7a0b40a59c6a19ae 100644 (file)
@@ -1,36 +1,39 @@
 #ifndef P_EFFECTS_H
 #define P_EFFECTS_H
 
-.int eent_net_name; // id
-.vector eent_net_location;
-.vector eent_net_velocity;
-.int eent_eff_trail;
-.string eent_eff_name;
-.int eent_net_count;
-
 #ifdef CSQC
 void Read_Effect(bool is_new);
 #elif defined(SVQC)
-void Send_Effect(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt);
+void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt);
+void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt);
 #endif
 
-const int EFFECT_FIRST = 1;
-int EFFECT_COUNT;
+#define particleeffectnum(e) _particleeffectnum(e.eent_eff_name)
 
+void RegisterEffects();
 const int MAX_EFFECTS = 512;
-entity effects_ent[MAX_EFFECTS];
+entity effects_ent[MAX_EFFECTS], effects_ent_first, effects_ent_last;
+int EFFECT_COUNT;
 
-void Create_Effect_Entity(int eff_name, string eff_string, int eff_trail);
+#define EFFECT(istrail, name, realname) \
+    REGISTER(RegisterEffects, EFFECT, effects_ent, EFFECT_COUNT, name, m_id, Create_Effect_Entity(realname, istrail));
+REGISTER_REGISTRY(RegisterEffects)
 
-#define EFFECT(istrail,name,realname) \
-    int name; \
-    void RegisterEffect_##name() \
-    { \
-        SET_FIELD_COUNT(name, EFFECT_FIRST, EFFECT_COUNT) \
-        CHECK_MAX_COUNT(name, MAX_EFFECTS, EFFECT_COUNT, "EFFECT") \
-        Create_Effect_Entity(name, realname, istrail); \
-    } \
-    ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffect_##name);
+.int m_id;
+.string eent_eff_name;
+.int eent_eff_trail;
+
+.vector eent_net_location;
+.vector eent_net_velocity;
+.int eent_net_count;
+
+entity Create_Effect_Entity(string eff_name, bool eff_trail)
+{
+       entity this = new(effect_entity);
+       this.eent_eff_name = eff_name;
+       this.eent_eff_trail = eff_trail;
+       return this;
+}
 
 void RegisterEffects_First()
 {
@@ -51,8 +54,8 @@ void RegisterEffects_Done()
 
 // NOW we actually activate the declarations
 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_First);
+EFFECT(0, NULL, string_null)
 #include "effects.inc"
 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_Done);
-#undef EFFECT
 
 #endif
index e2258dbd4956c42e52529a862b238e249584c85e..46ce94dd7e261d6f7781fd85b89afeead17a849f 100644 (file)
@@ -90,7 +90,7 @@ void mage_spike_explode()
 
        self.realowner.mage_spike = world;
 
-       Send_Effect("explosion_small", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, self.origin, '0 0 0', 1);
        RadiusDamage (self, self.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE, other);
 
        remove (self);
@@ -209,7 +209,7 @@ void mage_heal()
                        {
                                case 0:
                                        if(head.health < autocvar_g_balance_health_regenstable) head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_health_regenstable);
-                                       fx = "healing_fx";
+                                       fx = EFFECT_HEALING.eent_eff_name;
                                        break;
                                case 1:
                                        if(head.ammo_cells) head.ammo_cells = bound(head.ammo_cells, head.ammo_cells + 1, g_pickup_cells_max);
@@ -228,15 +228,15 @@ void mage_heal()
                                        break;
                                case 3:
                                        head.health = bound(0, head.health - ((head == self)  ? (autocvar_g_monster_mage_heal_self) : (autocvar_g_monster_mage_heal_allies)), autocvar_g_balance_health_regenstable);
-                                       fx = "rage";
+                                       fx = EFFECT_RAGE.eent_eff_name;
                                        break;
                        }
 
-                       Send_Effect(fx, head.origin, '0 0 0', 1);
+                       Send_Effect_(fx, head.origin, '0 0 0', 1);
                }
                else
                {
-                       Send_Effect("healing_fx", head.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_HEALING, head.origin, '0 0 0', 1);
                        head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), head.max_health);
                        if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE))
                                WaypointSprite_UpdateHealth(head.sprite, head.health);
@@ -254,7 +254,7 @@ void mage_push()
 {
        sound(self, CH_SHOTS, W_Sound("tagexp1"), 1, ATTEN_NORM);
        RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE, self.enemy);
-       Send_Effect("TE_EXPLOSION", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_TE_EXPLOSION, self.origin, '0 0 0', 1);
 
        self.frame = mage_anim_attack;
        self.attack_finished_single = time + (autocvar_g_monster_mage_attack_push_delay);
@@ -271,7 +271,7 @@ void mage_teleport()
        if(trace_fraction < 1)
                return;
 
-       Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1);
        setorigin(self, self.enemy.origin + ((v_forward * -1) * 200));
 
        self.attack_finished_single = time + 0.2;
index 47e371a978980daf59d020caaca3813a1152ef49..80325a2fa511c1ea9c4e853bb22bce493d91275d 100644 (file)
@@ -43,7 +43,7 @@ const float shambler_anim_death               = 8;
 void shambler_smash()
 {
        makevectors(self.angles);
-       Send_Effect("explosion_medium", (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_MEDIUM, (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
 
        tracebox(self.origin + v_forward * 50, self.mins * 0.5, self.maxs * 0.5, self.origin + v_forward * 500, MOVE_NORMAL, self);
@@ -68,7 +68,7 @@ void shambler_lightning_explode()
        entity head;
 
        sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("electro_impact", '0 0 0', '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_IMPACT, '0 0 0', '0 0 0', 1);
 
        self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
index de5f2c4593d7aa1b241c2949e3df62d596def3b3..21e0dbeb5c0ebc8e5dc3bdc4e15c663ea75bdfbf 100644 (file)
@@ -38,7 +38,7 @@ void spider_web_explode()
        entity e;
        if(self)
        {
-               Send_Effect("electro_impact", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_ELECTRO_IMPACT, self.origin, '0 0 0', 1);
                RadiusDamage(self, self.realowner, 0, 0, 25, world, world, 25, self.projectiledeathtype, world);
 
                for(e = findradius(self.origin, 25); e; e = e.chain) if(e != self) if(e.takedamage && e.deadflag == DEAD_NO) if(e.health > 0) if(e.monsterid != MON_SPIDER.monsterid)
index 849abc36c395dd9ed4bec60788fd64027176b9eb..355d9fa23801ebca0e25f791b82310720de48c08 100644 (file)
@@ -37,7 +37,7 @@ void wyvern_fireball_explode()
        entity e;
        if(self)
        {
-               Send_Effect("fireball_explode", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_FIREBALL_EXPLODE, self.origin, '0 0 0', 1);
 
                RadiusDamage(self, self.realowner, (autocvar_g_monster_wyvern_attack_fireball_damage), (autocvar_g_monster_wyvern_attack_fireball_edgedamage), (autocvar_g_monster_wyvern_attack_fireball_force), world, world, (autocvar_g_monster_wyvern_attack_fireball_radius), self.projectiledeathtype, world);
 
index 020355077f39c2e2bb267e9c48db5e4a1d08a109..9f8028aa8fe0204db44ed11d3446fb8cd6bcb541 100644 (file)
@@ -520,7 +520,7 @@ vector monster_pickmovetarget(entity targ)
 
                if(self.enemy)
                {
-                       /*WarpZone_TrailParticles(world, particleeffectnum("red_pass"), self.origin, targ_origin);
+                       /*WarpZone_TrailParticles(world, particleeffectnum(EFFECT_RED_PASS), self.origin, targ_origin);
                        print("Trace origin: ", vtos(targ_origin), "\n");
                        print("Target origin: ", vtos(self.enemy.origin), "\n");
                        print("My origin: ", vtos(self.origin), "\n"); */
@@ -843,7 +843,7 @@ void monster_remove(entity mon)
        if(!mon)
                return; // nothing to remove
 
-       Send_Effect("item_pickup", mon.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, mon.origin, '0 0 0', 1);
 
        if(mon.weaponentity)
                remove(mon.weaponentity);
index 444b99b35a0ce4dd1e6b3513cb41b068cec20714..b70d8b600938f5e8ac1fc253aad1083310c00806 100644 (file)
@@ -282,7 +282,7 @@ void spawnfunc_func_breakable()
        if(!self.debristimejitter) self.debristime = 2.5;
 
        if(self.mdl != "")
-               self.cnt = particleeffectnum(self.mdl);
+               self.cnt = _particleeffectnum(self.mdl);
        if(self.count == 0)
                self.count = 1;
 
index 9b32371dbeaa5af43a94e922bc179216d6f267c7..654db0f72ae1ba4cf979572e93718a7a5af7f692 100644 (file)
@@ -141,7 +141,7 @@ void spawnfunc_func_pointparticles()
                setsize(self, '0 0 0', self.maxs - self.mins);
        }
        if(!self.cnt)
-               self.cnt = particleeffectnum(self.mdl);
+               self.cnt = _particleeffectnum(self.mdl);
 
        Net_LinkEntity(self, (self.spawnflags & 4), 0, pointparticles_SendEntity);
 
index 2d9f0951954438bbae044e6b5138f58ad0334064..a7fb07815356973eee23bdee3c88a0878f312434 100644 (file)
@@ -218,16 +218,16 @@ void spawnfunc_misc_laser()
                        self.cnt = -1;
                else
                {
-                       self.cnt = particleeffectnum(self.mdl);
+                       self.cnt = _particleeffectnum(self.mdl);
                        if(self.cnt < 0)
                                if(self.dmg)
-                                       self.cnt = particleeffectnum("laser_deadly");
+                                       self.cnt = particleeffectnum(EFFECT_LASER_DEADLY);
                }
        }
        else if(!self.cnt)
        {
                if(self.dmg)
-                       self.cnt = particleeffectnum("laser_deadly");
+                       self.cnt = particleeffectnum(EFFECT_LASER_DEADLY);
                else
                        self.cnt = -1;
        }
index f7240f65a21057a57460ad40a75826a35b39f65f..3421311691863f31a23274c4bf73a02fe8af7372 100644 (file)
@@ -82,8 +82,8 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
                                sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTEN_NORM);
                        if(tflags & TELEPORT_FLAG_PARTICLES)
                        {
-                               Send_Effect("teleport", player.origin, '0 0 0', 1);
-                               Send_Effect("teleport", to + v_forward * 32, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, player.origin, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, to + v_forward * 32, '0 0 0', 1);
                        }
                        self.pushltime = time + 0.2;
                }
index b14078fb41a970b3eb176002ff189e5e149b4d3d..47f08d3acb321a0a50a2404d8d0cd2a34c519eb1 100644 (file)
@@ -181,7 +181,7 @@ void trigger_push_touch()
                if(self.pushltime < time)  // prevent "snorring" sound when a player hits the jumppad more than once
                {
                        // flash when activated
-                       Send_Effect("jumppad_activate", other.origin, other.velocity, 1);
+                       Send_Effect(EFFECT_JUMPPAD, other.origin, other.velocity, 1);
                        sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
                        self.pushltime = time + 0.2;
                }
index 788f64658148d27f031fb00de12fd175801be3db..f083e80d619e780c9afd4d7f0999753717160457 100644 (file)
@@ -45,11 +45,11 @@ void turret_draw()
 
        if(self.health < 85)
        if(dt < 0.01)
-               pointparticles(particleeffectnum("smoke_large"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_SMOKE_LARGE), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
        if(self.health < 32)
        if(dt < 0.015)
-               pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
 }
 
@@ -273,7 +273,7 @@ void turret_gibboom()
        float i;
 
        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+       pointparticles(particleeffectnum(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()
 {
        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), self.origin, '0 0 0', 1);
        if (!autocvar_cl_nogibs)
        {
                // Base
index 32bad5fb175b34a6163baf1e2fe7baeaedffe2b8..1a09611da0bad5a414cd10973362139af581ac42 100644 (file)
@@ -139,7 +139,7 @@ float t_ewheel(float req)
                 _mis = turret_projectile(W_Sound("lasergun_fire"), 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, TRUE, TRUE);
                 _mis.missile_flags = MIF_SPLASH;
 
-                Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 self.tur_head.frame += 2;
 
index 65d00be38b523c086cc5d7b70be758d49186015f..3b834e4775078a1ebf766f16652ab9b8165a2bed 100644 (file)
@@ -41,7 +41,7 @@ float t_flac(float req)
             turret_tag_fire_update();
 
             proj = turret_projectile(W_Sound("hagar_fire"), 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, TRUE, TRUE);
-            Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+            Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
             proj.think   = turret_flac_projectile_think_explode;
             proj.nextthink  = time + self.tur_impacttime + (random() * 0.01 - random() * 0.01);
             proj.missile_flags = MIF_SPLASH | MIF_PROXY;
index dfebe1a40880a9fe0c942f4c76e0db8b9972a4d2..dda66f72c570bb3309a8eee79dc0431ce30c1a28 100644 (file)
@@ -27,7 +27,7 @@ float t_plasma(float req)
                 FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
                                    800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
-                Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 // teamcolor / hit beam effect
                 vector v;
@@ -35,7 +35,7 @@ float t_plasma(float req)
                 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
                 s = strcat("TE_TEI_G3", ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
 
-                WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v);
+                WarpZone_TrailParticles(world, _particleeffectnum(s), self.tur_shotorg, v);
 
                 if (self.tur_head.frame == 0)
                     self.tur_head.frame = 1;
@@ -45,7 +45,7 @@ float t_plasma(float req)
                 entity missile = turret_projectile(W_Sound("hagar_fire"), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
                 missile.missile_flags = MIF_SPLASH;
 
-                Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
                 if (self.tur_head.frame == 0)
                     self.tur_head.frame = 1;
             }
index 79e2ba8158557db1988533ce1a3d21f7cd77394c..ef762387b89d5e68731baaa03e1cc56a2df0270c 100644 (file)
@@ -28,15 +28,15 @@ float t_plasma_dual(float req)
                                    800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
 
-                Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
                 // teamcolor / hit beam effect
                 vector v;
                 string s;
                 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
-                s = strcat("TE_TEI_G3", ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
+                s = strcat(EFFECT_VAPORIZER_NEUTRAL.eent_eff_name, ((self.team) ? Static_Team_ColorName_Upper(self.team) : ""));
 
-                WarpZone_TrailParticles(world, particleeffectnum(s), self.tur_shotorg, v);
+                WarpZone_TrailParticles(world, _particleeffectnum(s), self.tur_shotorg, v);
 
                 self.tur_head.frame += 1;
             }
@@ -44,7 +44,7 @@ float t_plasma_dual(float req)
             {
                 entity missile = turret_projectile(W_Sound("hagar_fire"), 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
                 missile.missile_flags = MIF_SPLASH;
-                Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+                Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
                 self.tur_head.frame += 1;
             }
 
index 1375d02ae21f3278c24abd2d2f4d58eee1f76c18..4a9ca77afe1b4e34e15b408f034ab928e6b8ca7d 100644 (file)
@@ -344,7 +344,7 @@ float t_walker(float req)
         {
             sound (self, CH_WEAPON_A, W_Sound("uzi_fire"), VOL_BASE, ATTEN_NORM);
             fireBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, 0, self.shot_dmg, self.shot_force, DEATH_TURRET_WALK_GUN, 0);
-            Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+            Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
             return true;
         }
index 7b0f6553630a3ca75074367b075bc08fefb7a072..523156006d9c9067315533bb68a34c7fa67430a8 100644 (file)
@@ -292,7 +292,7 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
                sound (self, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTEN_NORM);
 
        if(_mzlfx)
-               Send_Effect(_mzlfx, proj.origin, proj.velocity, 1);
+               Send_Effect_(_mzlfx, proj.origin, proj.velocity, 1);
 
        setsize (proj, '-1 -1 -1' * _size, '1 1 1' * _size);
 
@@ -304,8 +304,8 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
 void vehicles_gib_explode()
 {
        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
-       Send_Effect("explosion_small", self.wp00.origin + '0 0 64', '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, self.wp00.origin + '0 0 64', '0 0 0', 1);
        remove(self);
 }
 
@@ -479,7 +479,7 @@ void vehicles_clearreturn(entity veh)
 void vehicles_spawn();
 void vehicles_return()
 {
-       Send_Effect("teleport", self.wp00.origin + '0 0 64', '0 0 0', 1);
+       Send_Effect(EFFECT_TELEPORT, self.wp00.origin + '0 0 64', '0 0 0', 1);
 
        self.wp00.think  = vehicles_spawn;
        self.wp00.nextthink = time;
@@ -635,7 +635,7 @@ void vehicles_painframe()
                float _ftmp;
                _ftmp = self.owner.vehicle_health / 50;
                self.pain_frame = time + 0.1 + (random() * 0.5 * _ftmp);
-               pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
                if(self.vehicle_flags & VHF_DMGSHAKE)
                        self.velocity += randomvec() * 30;
@@ -1169,7 +1169,7 @@ void vehicles_spawn()
        self.angles = self.pos2;
        setorigin(self, self.pos1);
        // Show it
-       Send_Effect("teleport", self.origin + '0 0 64', '0 0 0', 1);
+       Send_Effect(EFFECT_TELEPORT, self.origin + '0 0 64', '0 0 0', 1);
 
        if(self.vehicle_controller)
                self.team = self.vehicle_controller.team;
index b33d3325622b14e2e27a15bc575d8eb0a2237432..7ace8225bb5965a9874ed19c29208ac89777d764 100644 (file)
@@ -104,7 +104,7 @@ float bumble_raygun_send(entity to, int sf);
 void bumblebee_fire_cannon(entity _gun, string _tagname, entity _owner)
 {
        vector v = gettaginfo(_gun, gettagindex(_gun, _tagname));
-       vehicles_projectile("bigplasma_muzzleflash", W_Sound("flacexp3"),
+       vehicles_projectile(EFFECT_BIGPLASMA_MUZZLEFLASH.eent_eff_name, W_Sound("flacexp3"),
                                                v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed,
                                                autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force,  0,
                                                DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, true, true, _owner);
@@ -717,7 +717,7 @@ void bumblebee_blowup()
                                 DEATH_VH_BUMB_DEATH, world);
 
        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("explosion_big", (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_BIG, (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
 
        if(self.owner.deadflag == DEAD_DYING)
                self.owner.deadflag = DEAD_DEAD;
@@ -733,7 +733,7 @@ void bumblebee_diethink()
        if(random() < 0.1)
        {
                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-               Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        }
 
        self.nextthink = time + 0.1;
@@ -877,7 +877,7 @@ float v_bumblebee(float req)
                        _body.scale = 1.5;
                        _body.angles = self.angles;
 
-                       Send_Effect("explosion_medium", findbetterlocation(self.origin, 16), '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation(self.origin, 16), '0 0 0', 1);
 
                        self.health                     = 0;
                        self.event_damage       = func_null;
@@ -1078,8 +1078,8 @@ void bumble_raygun_read(bool bIsNew)
                else
                        self.colormod = '0 1 0';
 
-               self.traileffect = particleeffectnum("healray_muzzleflash");
-               self.lip = particleeffectnum("healray_impact");
+               self.traileffect = particleeffectnum(EFFECT_BUMBLEBEE_HEAL_MUZZLEFLASH);
+               self.lip = particleeffectnum(EFFECT_BUMBLEBEE_HEAL_IMPACT);
 
                self.draw = bumble_raygun_draw;
        }
index f83df2873eb29e54020e0edeacd894c04375ae7d..38b06c3b3a80dd72fe182366622bfb9d9c4397b7 100644 (file)
@@ -174,7 +174,7 @@ void racer_fire_cannon(string tagname)
        entity bolt;
 
        v = gettaginfo(self, gettagindex(self, tagname));
-       bolt = vehicles_projectile("wakizashi_gun_muzzleflash", W_Sound("lasergun_fire"),
+       bolt = vehicles_projectile(EFFECT_RACER_MUZZLEFLASH.eent_eff_name, W_Sound("lasergun_fire"),
                                                   v, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed,
                                                   autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force,  0,
                                                   DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, true, true, self.owner);
@@ -292,7 +292,7 @@ void racer_rocket_tracker()
 void racer_fire_rocket(string tagname, entity trg)
 {
        vector v = gettaginfo(self, gettagindex(self, tagname));
-       entity rocket = vehicles_projectile("wakizashi_rocket_launch", W_Sound("rocket_fire"),
+       entity rocket = vehicles_projectile(EFFECT_RACER_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                   v, v_forward * autocvar_g_vehicle_racer_rocket_speed,
                                                   autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3,
                                                   DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, false, false, self.owner);
@@ -406,7 +406,7 @@ float racer_frame()
        {
 #ifdef SVQC
                if(time - racer.wait > 0.2)
-                       pointparticles(particleeffectnum("wakizashi_booster_smoke"), self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
+                       pointparticles(particleeffectnum(EFFECT_RACER_BOOSTER), self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
 #endif
 
                racer.wait = time;
@@ -427,7 +427,7 @@ float racer_frame()
                {
                        traceline(racer.origin, racer.origin - '0 0 256', MOVE_NORMAL, self);
                        if(trace_fraction != 1.0)
-                               pointparticles(particleeffectnum("smoke_small"), trace_endpos, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), trace_endpos, '0 0 0', 1);
 
                        racer.invincible_finished = time + 0.1 + (random() * 0.1);
                }
@@ -794,7 +794,7 @@ bool v_racer(int req)
                        self.cnt                        = 1 + random() * 2;
                        self.touch                      = racer_deadtouch;
 
-                       Send_Effect("explosion_medium", self.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_MEDIUM, self.origin, '0 0 0', 1);
 
                        if(random() < 0.5)
                                self.avelocity_z = 32;
index 035c20b8b032749bdbe0c9eeb8f28a0395b84c55..d2ddea77316b0c83b7d974bc83b02fe3708ea950 100644 (file)
@@ -195,7 +195,7 @@ void raptor_bombdrop()
 
 void raptor_fire_cannon(entity gun, string tagname)
 {
-       vehicles_projectile("raptor_cannon_muzzleflash", W_Sound("lasergun_fire"),
+       vehicles_projectile(EFFECT_RAPTOR_MUZZLEFLASH.eent_eff_name, W_Sound("lasergun_fire"),
                                                   gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
                                                   autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force,  0,
                                                   DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, true, true, self.owner);
@@ -728,7 +728,7 @@ void raptor_diethink()
        if(random() < 0.05)
        {
                sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-               Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        }
        self.nextthink = time;
 
@@ -842,7 +842,7 @@ float v_raptor(float req)
                        self.nextthink                  = time;
                        self.wait                               = time + 5 + (random() * 5);
 
-                       Send_Effect("explosion_medium", findbetterlocation (self.origin, 16), '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation (self.origin, 16), '0 0 0', 1);
 
                        self.velocity_z += 600;
 
index 8c238f865babb1d982d3f1c6b30b36460e39085d..973e1e5944741ee2353769495ad995ed0febd7d1 100644 (file)
@@ -269,7 +269,7 @@ void spiderbot_rocket_do()
        switch(self.vehicle_weapon2mode)
        {
                case SBRM_VOLLY:
-                       rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+                       rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                                   v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                                                   autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
@@ -283,7 +283,7 @@ void spiderbot_rocket_do()
                                self.wait = -10;
                        break;
                case SBRM_GUIDE:
-                       rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+                       rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                                   v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                                                   autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, false, self.owner);
@@ -295,7 +295,7 @@ void spiderbot_rocket_do()
 
                break;
                case SBRM_ARTILLERY:
-                       rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+                       rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH.eent_eff_name, W_Sound("rocket_fire"),
                                                                   v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                                                   autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                                                   DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
@@ -559,8 +559,8 @@ float spiderbot_frame()
                                 autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0);
 
                        sound (gun, CH_WEAPON_A, W_Sound("uzi_fire"), VOL_BASE, ATTEN_NORM);
-                       //trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
-                       pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
+                       //trailparticles(self, _particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
+                       pointparticles(particleeffectnum(EFFECT_SPIDERBOT_MINIGUN_MUZZLEFLASH), v, v_forward * 2500, 1);
 
                        self = spider;
 
@@ -679,7 +679,7 @@ void spiderbot_headfade()
                if(self.alpha > 0.1)
                {
                        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                       Send_Effect("explosion_big", self.origin + '0 0 100', '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_BIG, self.origin + '0 0 100', '0 0 0', 1);
                }
                remove(self);
        }
@@ -692,7 +692,7 @@ void spiderbot_blowup()
                if(random() < 0.1)
                {
                        sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
-                       Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+                       Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
                }
                self.nextthink = time + 0.1;
                return;
index 893311441c82d5f0b6c52b453572e0857c518ef7..c101a8c8ab326f79fd8d0e72972d00d30b0fc2b5 100644 (file)
@@ -265,7 +265,7 @@ void W_Arc_Beam_Think(void)
 
                        if ( WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max) )
                        {
-                               Send_Effect("arc_overheat",
+                               Send_Effect_("arc_overheat",
                                        self.beam_start, self.beam_wantdir, 1 );
                                sound(self, CH_WEAPON_A, W_Sound("arc_stop"), VOL_BASE, ATTN_NORM);
                        }
@@ -608,10 +608,10 @@ void Arc_Smoke()
        if ( self.arc_overheat > time )
        {
                if ( random() < self.arc_heat_percent )
-                       Send_Effect("arc_smoke", smoke_origin, '0 0 0', 1 );
+                       Send_Effect_("arc_smoke", smoke_origin, '0 0 0', 1 );
                if ( self.BUTTON_ATCK || self.BUTTON_ATCK2 )
                {
-                       Send_Effect("arc_overheat_fire", smoke_origin, w_shotdir, 1 );
+                       Send_Effect_("arc_overheat_fire", smoke_origin, w_shotdir, 1 );
                        if ( !self.arc_smoke_sound )
                        {
                                self.arc_smoke_sound = 1;
@@ -624,7 +624,7 @@ void Arc_Smoke()
        {
                if ( random() < (self.arc_beam.beam_heat-WEP_CVAR(arc, overheat_min)) /
                                ( WEP_CVAR(arc, overheat_max)-WEP_CVAR(arc, overheat_min) ) )
-                       Send_Effect("arc_smoke", smoke_origin, '0 0 0', 1 );
+                       Send_Effect_("arc_smoke", smoke_origin, '0 0 0', 1 );
        }
 
        if (  self.arc_smoke_sound && ( self.arc_overheat <= time ||
@@ -1281,13 +1281,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1306,13 +1306,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(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("grenadelauncher_muzzleflash");
+                               self.beam_muzzleeffect = -1; // particleeffectnum(EFFECT_GRENADE_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1332,13 +1332,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam_heal");
-                               self.beam_hiteffect = particleeffectnum("arc_beam_healimpact");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1358,13 +1358,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 50;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 0;
@@ -1384,13 +1384,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1410,13 +1410,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1436,13 +1436,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam_heal");
-                               self.beam_hiteffect = particleeffectnum("healray_impact");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM_HEAL);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1462,13 +1462,13 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
-                               self.beam_traileffect = particleeffectnum("arc_beam");
-                               self.beam_hiteffect = particleeffectnum("arc_lightning");
+                               self.beam_traileffect = particleeffectnum(EFFECT_ARC_BEAM);
+                               self.beam_hiteffect = particleeffectnum(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("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1496,7 +1496,7 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum(EFFECT_VORTEX_MUZZLEFLASH);
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
index 23cb071ea05bd980d079d70f3d65ff332741c3b8..6234f4a3e1154b1233afa9ee52ad5fd1b0d7f06d 100644 (file)
@@ -96,7 +96,7 @@ void W_Blaster_Attack(
        vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD);
 
        W_SetupShot_Dir(self, s_forward, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_B, atk_damage);
-       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        entity missile = spawn();
        missile.owner = missile.realowner = self;
@@ -275,7 +275,7 @@ bool W_Blaster(int request)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
                        return true;
                }
index 3c13a91db9c39bda54218489bc11b516e5c9bddf..08deaf78c4a81e5ade345c1e9fd8590e5fb194bf 100644 (file)
@@ -258,7 +258,7 @@ void W_Crylink_LinkJoinEffect_Think(void)
                                        e.projectiledeathtype,
                                        other
                                );
-                               Send_Effect("crylink_joinexplode", self.origin, '0 0 0', n);
+                               Send_Effect(EFFECT_CRYLINK_JOINEXPLODE, self.origin, '0 0 0', n);
                        }
                }
        }
@@ -360,7 +360,7 @@ void W_Crylink_Attack(void)
        up = v_up;
 
        shots = WEP_CVAR_PRI(crylink, shots);
-       Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
+       Send_Effect(EFFECT_CRYLINK_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, shots);
        proj = prevproj = firstproj = world;
        for(counter = 0; counter < shots; ++counter)
        {
@@ -469,7 +469,7 @@ void W_Crylink_Attack2(void)
        up = v_up;
 
        shots = WEP_CVAR_SEC(crylink, shots);
-       Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
+       Send_Effect(EFFECT_CRYLINK_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, shots);
        proj = prevproj = firstproj = world;
        for(counter = 0; counter < shots; ++counter)
        {
@@ -700,13 +700,13 @@ bool W_Crylink(int req)
                        org2 = w_org + w_backoff * 2;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_CRYLINK_IMPACT2), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("crylink_impact2"), VOL_BASE, ATTN_NORM);
                        }
                        else
                        {
-                               pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_CRYLINK_IMPACT), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("crylink_impact"), VOL_BASE, ATTN_NORM);
                        }
index fc4e2c3e0ca9ec9ae13de9353c83d2ee6cc9566e..9a235bf35d5206b4d5d8fe049aa355d85ad5a50c 100644 (file)
@@ -293,7 +293,7 @@ void W_Devastator_Think(void)
 
                        if(!self.count)
                        {
-                               Send_Effect("rocket_guide", self.origin, self.velocity, 1);
+                               Send_Effect(EFFECT_ROCKET_GUIDE, self.origin, self.velocity, 1);
                                // TODO add a better sound here
                                sound(self.realowner, CH_WEAPON_B, W_Sound("rocket_mode"), VOL_BASE, ATTN_NORM);
                                self.count = 1;
@@ -343,7 +343,7 @@ void W_Devastator_Attack(void)
        W_DecreaseAmmo(WEP_CVAR(devastator, ammo));
 
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 5, W_Sound("rocket_fire"), CH_WEAPON_A, WEP_CVAR(devastator, damage));
-       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
@@ -664,7 +664,7 @@ bool W_Devastator(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTN_NORM);
 
index bfe6edc32a63a7f5d8b7fa0e0c3a5939ee1aae38..0f60fd29d3568b6b430ba864ed9c23882e60f9e1 100644 (file)
@@ -260,7 +260,7 @@ void W_Electro_Attack_Bolt(void)
                WEP_CVAR_PRI(electro, damage)
        );
 
-       Send_Effect("electro_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.classname = "electro_bolt";
@@ -360,7 +360,7 @@ void W_Electro_Attack_Orb(void)
 
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       Send_Effect("electro_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        entity proj = spawn();
        proj.classname = "electro_orb";
@@ -580,7 +580,7 @@ bool W_Electro(int req)
                        org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_ELECTRO_BALLEXPLODE), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
                        }
@@ -589,13 +589,13 @@ bool W_Electro(int req)
                                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("electro_combo"), org2, '0 0 0', 1);
+                                       pointparticles(particleeffectnum(EFFECT_ELECTRO_COMBO), org2, '0 0 0', 1);
                                        if(!w_issilent)
                                                sound(self, CH_SHOTS, W_Sound("electro_impact_combo"), VOL_BASE, ATTEN_NORM);
                                }
                                else
                                {
-                                       pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1);
+                                       pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), org2, '0 0 0', 1);
                                        if(!w_issilent)
                                                sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
                                }
index 5f426086fac9f09994d519ed07da14fa9f3a2eb2..4f8f3787c3443335c0d91ca11aa72c5648d5b484 100644 (file)
@@ -100,7 +100,7 @@ void W_Fireball_Explode(void)
                                accuracy_add(self.realowner, WEP_FIREBALL.m_id, 0, WEP_CVAR_PRI(fireball, bfgdamage) * points);
 
                        Damage(e, self, self.realowner, WEP_CVAR_PRI(fireball, bfgdamage) * points, self.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, WEP_CVAR_PRI(fireball, bfgforce) * dir);
-                       Send_Effect("fireball_bfgdamage", e.origin, -1 * dir, 1);
+                       Send_Effect(EFFECT_FIREBALL_BFGDAMAGE, e.origin, -1 * dir, 1);
                }
        }
 
@@ -142,8 +142,8 @@ void W_Fireball_LaserPlay(float dt, float dist, float damage, float edgedamage,
                d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, self.origin) - RandomSelection_chosen_ent.fireball_impactvec);
                d = damage + (edgedamage - damage) * (d / dist);
                Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
-               //trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
-               Send_Effect("fireball_laser", self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+               //trailparticles(self, particleeffectnum(EFFECT_FIREBALL_LASER), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
+               Send_Effect(EFFECT_FIREBALL_LASER, self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
        }
 }
 
@@ -184,7 +184,7 @@ void W_Fireball_Attack1(void)
 
        W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 2, W_Sound("fireball_fire2"), CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage));
 
-       Send_Effect("fireball_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.classname = "plasma_prim";
@@ -221,7 +221,7 @@ void W_Fireball_AttackEffect(float i, vector f_diff)
 {
        W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 0, "", 0, 0);
        w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
-       Send_Effect("fireball_preattack_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 }
 
 void W_Fireball_Attack1_Frame4(void)
@@ -320,7 +320,7 @@ void W_Fireball_Attack2(void)
        traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
        w_shotorg = trace_endpos;
 
-       Send_Effect("fireball_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_FIREBALL_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.owner = proj.realowner = self;
@@ -462,7 +462,7 @@ bool W_Fireball(int req)
                        else
                        {
                                org2 = w_org + w_backoff * 16;
-                               pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_FIREBALL_EXPLODE), org2, '0 0 0', 1);
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM * 0.25); // long range boom
                        }
index 7856d0603d590bcceed725579036078b94e1ea7d..4f1b9058474596b1f1fc148090ed02cfe5488166 100644 (file)
@@ -114,7 +114,7 @@ void W_Hagar_Touch2(void)
                self.use();
        } else {
                self.cnt++;
-               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
+               Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
                self.angles = vectoangles(self.velocity);
                self.owner = world;
                self.projectiledeathtype |= HITTYPE_BOUNCE;
@@ -129,7 +129,7 @@ void W_Hagar_Attack(void)
 
        W_SetupShot(self, false, 2, W_Sound("hagar_fire"), CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage));
 
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -172,7 +172,7 @@ void W_Hagar_Attack2(void)
 
        W_SetupShot(self, false, 2, W_Sound("hagar_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
 
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -224,7 +224,7 @@ void W_Hagar_Attack2_Load_Release(void)
        weapon_prepareattack_do(1, WEP_CVAR_SEC(hagar, refire));
 
        W_SetupShot(self, false, 2, W_Sound("hagar_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        forward = v_forward;
        right = v_right;
@@ -533,7 +533,7 @@ bool W_Hagar(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                        {
                                if(w_random<0.15)
index ebcd5d2f179a776918891eaf8e572d0944468cc9..49685296a86385f6ffad495fff76356406be238f 100644 (file)
@@ -78,7 +78,7 @@ void W_HLAC_Attack(void)
         spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage));
-       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
        if(!autocvar_g_norecoil)
        {
                self.punchangle_x = random() - 0.5;
@@ -126,7 +126,7 @@ void W_HLAC_Attack2(void)
         spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, W_Sound("lasergun_fire"), CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
-       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -291,7 +291,7 @@ bool W_HLAC(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM);
 
index 3af3a486409bd1d3fc14b24f4915bcfcd83158c7..52b60e83bbf2549b5771f482efe3d64baa25de9c 100644 (file)
@@ -74,7 +74,7 @@ void W_HeavyMachineGun_Attack_Auto()
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -178,7 +178,7 @@ bool W_HeavyMachineGun(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                if(w_random < 0.05)
                                        sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_NORM);
index 068805cf31656814cd39ef3893e22603e0c94ff4..6c5519e60b5c8e5eab3768ed900426440c5e5deb 100644 (file)
@@ -345,7 +345,7 @@ bool W_Hook(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_HOOK_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("hookbomb_impact"), VOL_BASE, ATTN_NORM);
 
index cb87ad0725aa97b9f91a8ea6c63464b58c89dc5a..da1eb33a6046cf30fdda57a2a1d7d1de698ba60a 100644 (file)
@@ -119,7 +119,7 @@ void W_MachineGun_Attack(int deathtype)
        else
                fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), deathtype, 0);
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -192,7 +192,7 @@ void W_MachineGun_Attack_Auto(void)
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -215,7 +215,7 @@ void W_MachineGun_Attack_Burst(void)
 
        fireBullet(w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, 0);
 
-       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -378,7 +378,7 @@ bool W_MachineGun(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_MACHINEGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                if(w_random < 0.05)
                                        sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTN_NORM);
index d8f0a48e3be1d2689e448e0dc0514ae688d028fc..8048957bce8ab958dab25b557a0c55128b8daf86 100644 (file)
@@ -328,7 +328,7 @@ void W_MineLayer_Attack(void)
        W_DecreaseAmmo(WEP_CVAR(minelayer, ammo));
 
        W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 5, W_Sound("mine_fire"), CH_WEAPON_A, WEP_CVAR(minelayer, damage));
-       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        mine = WarpZone_RefSys_SpawnSameRefSys(self);
        mine.owner = mine.realowner = self;
@@ -600,7 +600,7 @@ bool W_MineLayer(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("mine_exp"), VOL_BASE, ATTN_NORM);
 
index 64bd3d97c93c7cc95f59f427fee07b3a8d891964..850a6c342fb4e2a6d0a4d47d552ab611e473bc9b 100644 (file)
@@ -151,7 +151,7 @@ void W_Mortar_Grenade_Touch1(void)
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce5"), VOL_BASE, ATTN_NORM);
                else
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce6"), VOL_BASE, ATTN_NORM);
-               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
+               Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
        }
@@ -196,7 +196,7 @@ void W_Mortar_Grenade_Touch2(void)
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce5"), VOL_BASE, ATTN_NORM);
                else
                        spamsound(self, CH_SHOTS, W_Sound("grenade_bounce6"), VOL_BASE, ATTN_NORM);
-               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
+               Send_Effect(EFFECT_HAGAR_BOUNCE, self.origin, self.velocity, 1);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
 
@@ -231,7 +231,7 @@ void W_Mortar_Attack(void)
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, W_Sound("grenade_fire"), CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.owner = gren.realowner = self;
@@ -280,7 +280,7 @@ void W_Mortar_Attack2(void)
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, W_Sound("grenade_fire"), CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.owner = gren.realowner = self;
@@ -468,7 +468,7 @@ bool W_Mortar(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_GRENADE_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("grenade_impact"), VOL_BASE, ATTN_NORM);
 
index fb6cc4d5f5d9d6b1d747fdf5b993301c8042e2ce..2d08c0fcfd2e553de3db16996b6eb07feb353ded 100644 (file)
@@ -243,7 +243,7 @@ void W_Porto_Attack(float type)
        w_shotdir = v_forward;
        w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
 
-       //Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       //Send_Effect(EFFECT_GRENADE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.cnt = type;
index 640dae3977e97899ffe4fd7dc73a6707925a4004..ef3babd8723c24128b30f9a6ff813fb676c0c1b9 100644 (file)
@@ -59,7 +59,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolid
 
        W_SetupShot(self, true, 2, pSound, CH_WEAPON_A, pDamage * pShots);
 
-       Send_Effect("rifle_muzzleflash", w_shotorg, w_shotdir * 2000, 1);
+       Send_Effect(EFFECT_RIFLE_MUZZLEFLASH, w_shotorg, w_shotdir * 2000, 1);
 
        if(self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) // if zoomed, shoot from the eye
        {
@@ -273,7 +273,7 @@ bool W_Rifle(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_RIFLE_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                        {
                                if(w_random < 0.2)
index de051d9870a00404af4e817b8be4a26d952ee1a3..8a34490e28c0760b91f07994c7dcde7907fb823a 100644 (file)
@@ -109,7 +109,7 @@ void W_RocketPropelledChainsaw_Attack (void)
 
        W_DecreaseAmmo(WEP_CVAR(rpc, ammo));
        W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', false, 5, W_Sound("rocket_fire"), CH_WEAPON_A, WEP_CVAR(rpc, damage));
-       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
        PROJECTILE_MAKETRIGGER(missile);
 
        missile.owner = missile.realowner = self;
@@ -241,7 +241,7 @@ bool W_RocketPropelledChainsaw(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
-                       pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
 
index 71938bfcc5d93b2644572fb53a4e41c33ad8c4f0..69c4974de666df4ac72f24dd5a759c4be0457f5a 100644 (file)
@@ -252,7 +252,7 @@ void W_Seeker_Fire_Missile(vector f_diff, entity m_target)
        makevectors(self.v_angle);
        W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, W_Sound("seeker_fire"), CH_WEAPON_A, 0);
        w_shotorg += f_diff;
-       Send_Effect("seeker_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_SEEKER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        //self.detornator         = false;
 
@@ -344,7 +344,7 @@ void W_Seeker_Fire_Flac(void)
        W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, W_Sound("flac_fire"), CH_WEAPON_A, WEP_CVAR(seeker, flac_damage));
        w_shotorg += f_diff;
 
-       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        missile                                 = spawn();
        missile.owner                   = missile.realowner = self;
@@ -743,7 +743,7 @@ bool W_Seeker(int req)
                                }
                                else
                                {
-                                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                                       pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
                                        if(!w_issilent)
                                        {
                                                if(w_random<0.15)
@@ -757,7 +757,7 @@ bool W_Seeker(int req)
                        }
                        else
                        {
-                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_HAGAR_EXPLODE), org2, '0 0 0', 1);
                                if(!w_issilent)
                                {
                                        if(w_random<0.15)
index f0e832f2bca3bb3af44b42a35552b6d6827212af..3287ea3cb366e88a61cf9cca8d1a96fc67b81971 100644 (file)
@@ -874,7 +874,7 @@ bool W_Shockwave(int req)
                        // handled by Net_ReadShockwaveParticle
                        //vector org2;
                        //org2 = w_org + w_backoff * 2;
-                       //pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                       //pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        return false;
                }
                case WR_INIT:
index 1c20423df3b4871551e57995599dbe36e785d363..9024bbfa1f70e36b57db17674bf6498f7c5e6d0a 100644 (file)
@@ -65,7 +65,7 @@ void W_Shotgun_Attack(float isprimary)
        for(sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1)
                fireBullet(w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN.m_id, 0);
 
-       Send_Effect("shotgun_muzzleflash", w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
+       Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
 
        // casing code
        if(autocvar_g_casings >= 1)
@@ -359,7 +359,7 @@ float W_Shotgun(float req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
-                       pointparticles(particleeffectnum("shotgun_impact"), org2, w_backoff * 1000, 1);
+                       pointparticles(particleeffectnum(EFFECT_SHOTGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent && time - self.prevric > 0.25)
                        {
                                if(w_random < 0.0165)
index bd9dff50e743e3703b2e75f21c22ef5bf379118c..686c89ec3a7f6f0dae6a0fe3ed8c0761735b6555 100644 (file)
@@ -363,7 +363,7 @@ void W_Tuba_NoteOn(float hittype)
        o = gettaginfo(self.exteriorweaponentity, 0);
        if(time > self.tuba_smoketime)
        {
-               Send_Effect("smoke_ring", o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
+               Send_Effect(EFFECT_SMOKE_RING, o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
                self.tuba_smoketime = time + 0.25;
        }
 }
@@ -454,7 +454,7 @@ bool W_Tuba(int req)
                                                break;
                                }
                                W_SetupShot(self, false, 0, "", 0, 0);
-                               Send_Effect("teleport", w_shotorg, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, w_shotorg, '0 0 0', 1);
                                self.weaponentity.state = WS_INUSE;
                                weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready);
                        }
index c5dd7826b6afa3cebf06773e09ad4de909deb3dc..f61960594a69cef4040fceb65694487c7bc700fe 100644 (file)
@@ -76,7 +76,7 @@ void W_Vaporizer_Attack(void)
 
        self.vaporizer_lasthit = damage_goodhits;
 
-       Send_Effect("nex_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
 
        // teamcolor / hit beam effect
        vector v;
@@ -85,33 +85,33 @@ void W_Vaporizer_Attack(void)
        {
                case NUM_TEAM_1:   // Red
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3RED_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_RED_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3RED", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_RED, w_shotorg, v, 1);
                        break;
                case NUM_TEAM_2:   // Blue
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3BLUE_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_BLUE_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3BLUE", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_BLUE, w_shotorg, v, 1);
                        break;
                case NUM_TEAM_3:   // Yellow
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3YELLOW_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_YELLOW_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3YELLOW", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_YELLOW, w_shotorg, v, 1);
                        break;
                case NUM_TEAM_4:   // Pink
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3PINK_HIT", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_PINK_HIT, w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3PINK", w_shotorg, v, 1);
+                               Send_Effect(EFFECT_VAPORIZER_PINK, w_shotorg, v, 1);
                        break;
                default:
                        if(damage_goodhits)
-                               Send_Effect("TE_TEI_G3_HIT", w_shotorg, v, 1);
+                               Send_Effect_("TE_TEI_G3_HIT", w_shotorg, v, 1);
                        else
-                               Send_Effect("TE_TEI_G3", w_shotorg, v, 1);
+                               Send_Effect_("TE_TEI_G3", w_shotorg, v, 1);
                        break;
        }
 
@@ -266,12 +266,12 @@ float W_Vaporizer(float req)
                        org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
-                               pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
+                               pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
                        }
                        else
                        {
-                               pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
+                               pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM); }
                        }
                        return true;
index d47cebde462504361bf615f0fcf20589f70e116c..3aa17e526d566f02734a72dd2d9cb7cbb753a35a 100644 (file)
@@ -327,7 +327,7 @@ bool W_Vortex(int req)
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
-                       pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM);
 
index b42292c8523812c82b44a2c7df68e8b4e490ebc8..f48df8e5ccd3c1218334bd1bc825708f8382161c 100644 (file)
@@ -10,6 +10,8 @@
 
 #define spawn _spawn
 
+#define particleeffectnum _particleeffectnum
+
 #include "upstream/csprogsdefs.qc"
 
 #undef true
@@ -19,6 +21,8 @@
 
 #undef spawn
 
+#undef particleeffectnum
+
 #pragma noref 0
 
 #define ReadFloat() ReadCoord()
index 2487da4ff357a8751c3ab8e643ce0168ad02c47a..7b437082f191096ac3aadd7b2bfc6583b50c3eae 100644 (file)
@@ -3,13 +3,16 @@
 
 #pragma noref 1
 
+#define particleeffectnum __particleeffectnum
+
 #include "upstream/dpextensions.qc"
 
+#undef particleeffectnum
+
 int(entity ent, string tagname) _gettagindex = #451;
 #define gettagindex _gettagindex
 
 int(string effectname) _particleeffectnum = #335;
-#define particleeffectnum _particleeffectnum
 
 int(string s, string separator1, ...) _tokenizebyseparator = #479;
 #define tokenizebyseparator _tokenizebyseparator
index b193c4d6cc94a0b34ab1cb06ad5b6a8df6404f00..4d5821c811c5ef5fda2db59fd6fb4a9db4d33ed6 100644 (file)
@@ -282,7 +282,7 @@ float CheatImpulse(float i)
                        else
                                e = self;
 
-                       Send_Effect("rocket_explode", e.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_ROCKET_EXPLODE, e.origin, '0 0 0', 1);
                        sound(e, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
 
                        e2 = spawn();
@@ -326,7 +326,7 @@ float CheatCommand(float argc)
                                start = (1-f) * self.origin + f * trace_endpos;
                                end = stov(argv(3));
                                f = stof(argv(4));
-                               Send_Effect(argv(1), start, end, f);
+                               Send_Effect_(argv(1), start, end, f);
                                DID_CHEAT();
                                break;
                        }
@@ -338,7 +338,7 @@ float CheatCommand(float argc)
                        {
                                // arguments:
                                //   effectname
-                               effectnum = particleeffectnum(argv(1));
+                               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);
index 6577347eee602a3e120ecf637c293ac0240350cc..bb3d76e1f0c898050d836c29458e4aa11fe5055e 100644 (file)
@@ -190,7 +190,7 @@ void PutObserverInServer (void)
        entity  spot;
     self.hud = HUD_NORMAL;
 
-       if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
+       if(IS_PLAYER(self)) { Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1); }
 
        spot = SelectSpawnPoint (true);
        if(!spot)
@@ -1306,7 +1306,7 @@ void ClientDisconnect (void)
        if ( self.active_minigame )
                part_minigame(self);
 
-       if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
+       if(IS_PLAYER(self)) { Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1); }
 
        CheatShutdownClient();
 
@@ -1449,7 +1449,7 @@ void respawn(void)
                self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
                self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
                self.effects |= CSQCMODEL_EF_RESPAWNGHOST;
-               Send_Effect("respawn_ghost", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_RESPAWN_GHOST, self.origin, '0 0 0', 1);
                if(autocvar_g_respawn_ghosts_maxtime)
                        SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5);
        }
index f0ecfb3e8673955fcbaf74397aa0b324fc011c19..8ed9619d540f7cdcc6beeefee22e11f596c63c98 100644 (file)
@@ -531,7 +531,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, int deathtyp
                        if(deathtype == DEATH_KILL)
                        {
                                // for the lemmings fans, a small harmless explosion
-                               Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
+                               Send_Effect(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
                        }
                }
 
index 0855d41c921c34dbd38ec7ef9f65bc7a87d76396..08728a6403a5df75361c8c5a09da20eb31155c60 100644 (file)
@@ -683,42 +683,42 @@ void GameCommand_effectindexdump(float request)
 
                        d = db_create();
                        LOG_INFO("begin of effects list\n");
-                       db_put(d, "TE_GUNSHOT", "1"); LOG_INFO("effect TE_GUNSHOT is ", ftos(particleeffectnum("TE_GUNSHOT")), "\n");
-                       db_put(d, "TE_GUNSHOTQUAD", "1"); LOG_INFO("effect TE_GUNSHOTQUAD is ", ftos(particleeffectnum("TE_GUNSHOTQUAD")), "\n");
-                       db_put(d, "TE_SPIKE", "1"); LOG_INFO("effect TE_SPIKE is ", ftos(particleeffectnum("TE_SPIKE")), "\n");
-                       db_put(d, "TE_SPIKEQUAD", "1"); LOG_INFO("effect TE_SPIKEQUAD is ", ftos(particleeffectnum("TE_SPIKEQUAD")), "\n");
-                       db_put(d, "TE_SUPERSPIKE", "1"); LOG_INFO("effect TE_SUPERSPIKE is ", ftos(particleeffectnum("TE_SUPERSPIKE")), "\n");
-                       db_put(d, "TE_SUPERSPIKEQUAD", "1"); LOG_INFO("effect TE_SUPERSPIKEQUAD is ", ftos(particleeffectnum("TE_SUPERSPIKEQUAD")), "\n");
-                       db_put(d, "TE_WIZSPIKE", "1"); LOG_INFO("effect TE_WIZSPIKE is ", ftos(particleeffectnum("TE_WIZSPIKE")), "\n");
-                       db_put(d, "TE_KNIGHTSPIKE", "1"); LOG_INFO("effect TE_KNIGHTSPIKE is ", ftos(particleeffectnum("TE_KNIGHTSPIKE")), "\n");
-                       db_put(d, "TE_EXPLOSION", "1"); LOG_INFO("effect TE_EXPLOSION is ", ftos(particleeffectnum("TE_EXPLOSION")), "\n");
-                       db_put(d, "TE_EXPLOSIONQUAD", "1"); LOG_INFO("effect TE_EXPLOSIONQUAD is ", ftos(particleeffectnum("TE_EXPLOSIONQUAD")), "\n");
-                       db_put(d, "TE_TAREXPLOSION", "1"); LOG_INFO("effect TE_TAREXPLOSION is ", ftos(particleeffectnum("TE_TAREXPLOSION")), "\n");
-                       db_put(d, "TE_TELEPORT", "1"); LOG_INFO("effect TE_TELEPORT is ", ftos(particleeffectnum("TE_TELEPORT")), "\n");
-                       db_put(d, "TE_LAVASPLASH", "1"); LOG_INFO("effect TE_LAVASPLASH is ", ftos(particleeffectnum("TE_LAVASPLASH")), "\n");
-                       db_put(d, "TE_SMALLFLASH", "1"); LOG_INFO("effect TE_SMALLFLASH is ", ftos(particleeffectnum("TE_SMALLFLASH")), "\n");
-                       db_put(d, "TE_FLAMEJET", "1"); LOG_INFO("effect TE_FLAMEJET is ", ftos(particleeffectnum("TE_FLAMEJET")), "\n");
-                       db_put(d, "EF_FLAME", "1"); LOG_INFO("effect EF_FLAME is ", ftos(particleeffectnum("EF_FLAME")), "\n");
-                       db_put(d, "TE_BLOOD", "1"); LOG_INFO("effect TE_BLOOD is ", ftos(particleeffectnum("TE_BLOOD")), "\n");
-                       db_put(d, "TE_SPARK", "1"); LOG_INFO("effect TE_SPARK is ", ftos(particleeffectnum("TE_SPARK")), "\n");
-                       db_put(d, "TE_PLASMABURN", "1"); LOG_INFO("effect TE_PLASMABURN is ", ftos(particleeffectnum("TE_PLASMABURN")), "\n");
-                       db_put(d, "TE_TEI_G3", "1"); LOG_INFO("effect TE_TEI_G3 is ", ftos(particleeffectnum("TE_TEI_G3")), "\n");
-                       db_put(d, "TE_TEI_SMOKE", "1"); LOG_INFO("effect TE_TEI_SMOKE is ", ftos(particleeffectnum("TE_TEI_SMOKE")), "\n");
-                       db_put(d, "TE_TEI_BIGEXPLOSION", "1"); LOG_INFO("effect TE_TEI_BIGEXPLOSION is ", ftos(particleeffectnum("TE_TEI_BIGEXPLOSION")), "\n");
-                       db_put(d, "TE_TEI_PLASMAHIT", "1"); LOG_INFO("effect TE_TEI_PLASMAHIT is ", ftos(particleeffectnum("TE_TEI_PLASMAHIT")), "\n");
-                       db_put(d, "EF_STARDUST", "1"); LOG_INFO("effect EF_STARDUST is ", ftos(particleeffectnum("EF_STARDUST")), "\n");
-                       db_put(d, "TR_ROCKET", "1"); LOG_INFO("effect TR_ROCKET is ", ftos(particleeffectnum("TR_ROCKET")), "\n");
-                       db_put(d, "TR_GRENADE", "1"); LOG_INFO("effect TR_GRENADE is ", ftos(particleeffectnum("TR_GRENADE")), "\n");
-                       db_put(d, "TR_BLOOD", "1"); LOG_INFO("effect TR_BLOOD is ", ftos(particleeffectnum("TR_BLOOD")), "\n");
-                       db_put(d, "TR_WIZSPIKE", "1"); LOG_INFO("effect TR_WIZSPIKE is ", ftos(particleeffectnum("TR_WIZSPIKE")), "\n");
-                       db_put(d, "TR_SLIGHTBLOOD", "1"); LOG_INFO("effect TR_SLIGHTBLOOD is ", ftos(particleeffectnum("TR_SLIGHTBLOOD")), "\n");
-                       db_put(d, "TR_KNIGHTSPIKE", "1"); LOG_INFO("effect TR_KNIGHTSPIKE is ", ftos(particleeffectnum("TR_KNIGHTSPIKE")), "\n");
-                       db_put(d, "TR_VORESPIKE", "1"); LOG_INFO("effect TR_VORESPIKE is ", ftos(particleeffectnum("TR_VORESPIKE")), "\n");
-                       db_put(d, "TR_NEHAHRASMOKE", "1"); LOG_INFO("effect TR_NEHAHRASMOKE is ", ftos(particleeffectnum("TR_NEHAHRASMOKE")), "\n");
-                       db_put(d, "TR_NEXUIZPLASMA", "1"); LOG_INFO("effect TR_NEXUIZPLASMA is ", ftos(particleeffectnum("TR_NEXUIZPLASMA")), "\n");
-                       db_put(d, "TR_GLOWTRAIL", "1"); LOG_INFO("effect TR_GLOWTRAIL is ", ftos(particleeffectnum("TR_GLOWTRAIL")), "\n");
-                       db_put(d, "TR_SEEKER", "1"); LOG_INFO("effect TR_SEEKER is ", ftos(particleeffectnum("TR_SEEKER")), "\n");
-                       db_put(d, "SVC_PARTICLE", "1"); LOG_INFO("effect SVC_PARTICLE is ", ftos(particleeffectnum("SVC_PARTICLE")), "\n");
+                       db_put(d, "TE_GUNSHOT", "1"); LOG_INFO("effect TE_GUNSHOT is ", ftos(_particleeffectnum("TE_GUNSHOT")), "\n");
+                       db_put(d, "TE_GUNSHOTQUAD", "1"); LOG_INFO("effect TE_GUNSHOTQUAD is ", ftos(_particleeffectnum("TE_GUNSHOTQUAD")), "\n");
+                       db_put(d, "TE_SPIKE", "1"); LOG_INFO("effect TE_SPIKE is ", ftos(_particleeffectnum("TE_SPIKE")), "\n");
+                       db_put(d, "TE_SPIKEQUAD", "1"); LOG_INFO("effect TE_SPIKEQUAD is ", ftos(_particleeffectnum("TE_SPIKEQUAD")), "\n");
+                       db_put(d, "TE_SUPERSPIKE", "1"); LOG_INFO("effect TE_SUPERSPIKE is ", ftos(_particleeffectnum("TE_SUPERSPIKE")), "\n");
+                       db_put(d, "TE_SUPERSPIKEQUAD", "1"); LOG_INFO("effect TE_SUPERSPIKEQUAD is ", ftos(_particleeffectnum("TE_SUPERSPIKEQUAD")), "\n");
+                       db_put(d, "TE_WIZSPIKE", "1"); LOG_INFO("effect TE_WIZSPIKE is ", ftos(_particleeffectnum("TE_WIZSPIKE")), "\n");
+                       db_put(d, "TE_KNIGHTSPIKE", "1"); LOG_INFO("effect TE_KNIGHTSPIKE is ", ftos(_particleeffectnum("TE_KNIGHTSPIKE")), "\n");
+                       db_put(d, "TE_EXPLOSION", "1"); LOG_INFO("effect TE_EXPLOSION is ", ftos(_particleeffectnum("TE_EXPLOSION")), "\n");
+                       db_put(d, "TE_EXPLOSIONQUAD", "1"); LOG_INFO("effect TE_EXPLOSIONQUAD is ", ftos(_particleeffectnum("TE_EXPLOSIONQUAD")), "\n");
+                       db_put(d, "TE_TAREXPLOSION", "1"); LOG_INFO("effect TE_TAREXPLOSION is ", ftos(_particleeffectnum("TE_TAREXPLOSION")), "\n");
+                       db_put(d, "TE_TELEPORT", "1"); LOG_INFO("effect TE_TELEPORT is ", ftos(_particleeffectnum("TE_TELEPORT")), "\n");
+                       db_put(d, "TE_LAVASPLASH", "1"); LOG_INFO("effect TE_LAVASPLASH is ", ftos(_particleeffectnum("TE_LAVASPLASH")), "\n");
+                       db_put(d, "TE_SMALLFLASH", "1"); LOG_INFO("effect TE_SMALLFLASH is ", ftos(_particleeffectnum("TE_SMALLFLASH")), "\n");
+                       db_put(d, "TE_FLAMEJET", "1"); LOG_INFO("effect TE_FLAMEJET is ", ftos(_particleeffectnum("TE_FLAMEJET")), "\n");
+                       db_put(d, "EF_FLAME", "1"); LOG_INFO("effect EF_FLAME is ", ftos(_particleeffectnum("EF_FLAME")), "\n");
+                       db_put(d, "TE_BLOOD", "1"); LOG_INFO("effect TE_BLOOD is ", ftos(_particleeffectnum("TE_BLOOD")), "\n");
+                       db_put(d, "TE_SPARK", "1"); LOG_INFO("effect TE_SPARK is ", ftos(_particleeffectnum("TE_SPARK")), "\n");
+                       db_put(d, "TE_PLASMABURN", "1"); LOG_INFO("effect TE_PLASMABURN is ", ftos(_particleeffectnum("TE_PLASMABURN")), "\n");
+                       db_put(d, "TE_TEI_G3", "1"); LOG_INFO("effect TE_TEI_G3 is ", ftos(_particleeffectnum("TE_TEI_G3")), "\n");
+                       db_put(d, "TE_TEI_SMOKE", "1"); LOG_INFO("effect TE_TEI_SMOKE is ", ftos(_particleeffectnum("TE_TEI_SMOKE")), "\n");
+                       db_put(d, "TE_TEI_BIGEXPLOSION", "1"); LOG_INFO("effect TE_TEI_BIGEXPLOSION is ", ftos(_particleeffectnum("TE_TEI_BIGEXPLOSION")), "\n");
+                       db_put(d, "TE_TEI_PLASMAHIT", "1"); LOG_INFO("effect TE_TEI_PLASMAHIT is ", ftos(_particleeffectnum("TE_TEI_PLASMAHIT")), "\n");
+                       db_put(d, "EF_STARDUST", "1"); LOG_INFO("effect EF_STARDUST is ", ftos(_particleeffectnum("EF_STARDUST")), "\n");
+                       db_put(d, "TR_ROCKET", "1"); LOG_INFO("effect TR_ROCKET is ", ftos(_particleeffectnum("TR_ROCKET")), "\n");
+                       db_put(d, "TR_GRENADE", "1"); LOG_INFO("effect TR_GRENADE is ", ftos(_particleeffectnum("TR_GRENADE")), "\n");
+                       db_put(d, "TR_BLOOD", "1"); LOG_INFO("effect TR_BLOOD is ", ftos(_particleeffectnum("TR_BLOOD")), "\n");
+                       db_put(d, "TR_WIZSPIKE", "1"); LOG_INFO("effect TR_WIZSPIKE is ", ftos(_particleeffectnum("TR_WIZSPIKE")), "\n");
+                       db_put(d, "TR_SLIGHTBLOOD", "1"); LOG_INFO("effect TR_SLIGHTBLOOD is ", ftos(_particleeffectnum("TR_SLIGHTBLOOD")), "\n");
+                       db_put(d, "TR_KNIGHTSPIKE", "1"); LOG_INFO("effect TR_KNIGHTSPIKE is ", ftos(_particleeffectnum("TR_KNIGHTSPIKE")), "\n");
+                       db_put(d, "TR_VORESPIKE", "1"); LOG_INFO("effect TR_VORESPIKE is ", ftos(_particleeffectnum("TR_VORESPIKE")), "\n");
+                       db_put(d, "TR_NEHAHRASMOKE", "1"); LOG_INFO("effect TR_NEHAHRASMOKE is ", ftos(_particleeffectnum("TR_NEHAHRASMOKE")), "\n");
+                       db_put(d, "TR_NEXUIZPLASMA", "1"); LOG_INFO("effect TR_NEXUIZPLASMA is ", ftos(_particleeffectnum("TR_NEXUIZPLASMA")), "\n");
+                       db_put(d, "TR_GLOWTRAIL", "1"); LOG_INFO("effect TR_GLOWTRAIL is ", ftos(_particleeffectnum("TR_GLOWTRAIL")), "\n");
+                       db_put(d, "TR_SEEKER", "1"); LOG_INFO("effect TR_SEEKER is ", ftos(_particleeffectnum("TR_SEEKER")), "\n");
+                       db_put(d, "SVC_PARTICLE", "1"); LOG_INFO("effect SVC_PARTICLE is ", ftos(_particleeffectnum("SVC_PARTICLE")), "\n");
 
                        fh = fopen("effectinfo.txt", FILE_READ);
                        while((s = fgets(fh)))
@@ -728,8 +728,9 @@ void GameCommand_effectindexdump(float request)
                                {
                                        if(db_get(d, argv(1)) != "1")
                                        {
-                                               if(particleeffectnum(argv(1)) >= 0)
-                                                       LOG_INFO("effect ", argv(1), " is ", ftos(particleeffectnum(argv(1))), "\n");
+                                               int i = _particleeffectnum(argv(1));
+                                               if(i >= 0)
+                                                       LOG_INFO("effect ", argv(1), " is ", ftos(i), "\n");
                                                db_put(d, argv(1), "1");
                                        }
                                }
@@ -1698,8 +1699,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("TR_NEXUIZPLASMA"), vv, trace_endpos);
-                                               trailparticles(world, particleeffectnum("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 e1b9559c36a694b72b507babedb1cfa1701d0ed4..39ad85c6dbabf69e93ab8b97b645effbaea93e8b 100644 (file)
@@ -758,7 +758,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        {
                                Unfreeze(targ);
                                targ.health = autocvar_g_freezetag_revive_falldamage_health;
-                               Send_Effect("iceorglass", targ.origin, '0 0 0', 3);
+                               Send_Effect(EFFECT_ICEORGLASS, targ.origin, '0 0 0', 3);
                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, targ.netname);
                                Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);
                        }
@@ -769,7 +769,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
 
                if(targ.frozen && deathtype == DEATH_HURTTRIGGER && !autocvar_g_freezetag_frozen_damage_trigger)
                {
-                       Send_Effect("teleport", targ.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_TELEPORT, targ.origin, '0 0 0', 1);
 
                        entity oldself = self;
                        self = targ;
@@ -799,7 +799,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                self.oldorigin = self.origin;
                                self.prevorigin = self.origin;
 
-                               Send_Effect("teleport", self.origin, '0 0 0', 1);
+                               Send_Effect(EFFECT_TELEPORT, self.origin, '0 0 0', 1);
                        }
 
                        self = oldself;
index 866f71f72e0e3fa6674a8e0ea9af48f5e316cde9..a9b16d002f567c7edb91852f666826f8c7fd4c0a 100644 (file)
@@ -90,7 +90,7 @@ void GrapplingHookReset(void)
 void GrapplingHookThink();
 void GrapplingHook_Stop()
 {
-       Send_Effect("grapple_impact", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_HOOK_IMPACT, self.origin, '0 0 0', 1);
        sound (self, CH_SHOTS, W_Sound("hook_impact"), VOL_BASE, ATTEN_NORM);
 
        self.state = 1;
@@ -333,7 +333,7 @@ void FireGrapplingHook (void)
        tracebox(self.origin + self.view_ofs, '-3 -3 -3', '3 3 3', org, MOVE_NORMAL, self);
        org = trace_endpos;
 
-       Send_Effect("grapple_muzzleflash", org, '0 0 0', 1);
+       Send_Effect(EFFECT_HOOK_MUZZLEFLASH, org, '0 0 0', 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
index de4492ac982a8cef11b17edd77e03e3cd990c4ba..15c1ae68deebc79c6ede8126f218c3f4febb7c59 100644 (file)
@@ -564,7 +564,6 @@ void spawnfunc___init_dedicated_server(void)
        CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
-       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
@@ -612,7 +611,6 @@ void spawnfunc_worldspawn (void)
        CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
-       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        initialize_minigames();
 
index d79e1310d02cf63c3cde974fc20828954449d8e0..2b9cf02158eafa89def6acf588def59a4e793653 100644 (file)
@@ -364,7 +364,7 @@ void ctf_Handle_Throw(entity player, entity receiver, int droptype)
 
                        // other
                        sound(player, CH_TRIGGER, flag.snd_flag_touch, VOL_BASE, ATTEN_NORM);
-                       WarpZone_TrailParticles(world, particleeffectnum(flag.passeffect), player.origin, targ_origin);
+                       WarpZone_TrailParticles(world, _particleeffectnum(flag.passeffect), player.origin, targ_origin);
                        ctf_EventLog("pass", flag.team, player);
                        break;
                }
@@ -455,7 +455,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, int capturetype)
                PlayerScore_Add(player, SP_CTF_CAPTIME, new_time - old_time);
 
        // effects
-       Send_Effect(flag.capeffect, flag.origin, '0 0 0', 1);
+       Send_Effect_(flag.capeffect, flag.origin, '0 0 0', 1);
        //shockwave_spawn("models/ctf/shockwavetransring.md3", flag.origin - '0 0 15', -0.8, 0, 1);
 
        // other
@@ -609,7 +609,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
        }
 
        // effects
-       Send_Effect(flag.toucheffect, player.origin, '0 0 0', 1);
+       Send_Effect_(flag.toucheffect, player.origin, '0 0 0', 1);
 
        // waypoints
        if(pickuptype == PICKUP_DROPPED) { WaypointSprite_Kill(flag.wps_flagdropped); }
@@ -941,7 +941,7 @@ void ctf_FlagTouch()
        {
                if(time > self.wait) // if we haven't in a while, play a sound/effect
                {
-                       Send_Effect(self.toucheffect, self.origin, '0 0 0', 1);
+                       Send_Effect_(self.toucheffect, self.origin, '0 0 0', 1);
                        sound(self, CH_TRIGGER, self.snd_flag_touch, VOL_BASE, ATTEN_NORM);
                        self.wait = time + FLAG_TOUCHRATE;
                }
index 8a2368e522af5dfde357b4bc900ac192bdb90cb6..65c7ba6e56635a727abfae89c2341a92fb422815 100644 (file)
@@ -47,8 +47,8 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated
        self.think = ka_RespawnBall;
        self.nextthink = time + autocvar_g_keepawayball_respawntime;
 
-       Send_Effect("electro_combo", oldballorigin, '0 0 0', 1);
-       Send_Effect("electro_combo", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, oldballorigin, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, self.origin, '0 0 0', 1);
 
        WaypointSprite_Spawn(WP_KaBall, 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER);
        WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
@@ -81,7 +81,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        if(other.frozen) { return; }
        if (!IS_PLAYER(other))
        {  // The ball just touched an object, most likely the world
-               Send_Effect("kaball_sparks", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_BALL_SPARKS, self.origin, '0 0 0', 1);
                sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM);
                return;
        }
index a84ffa57d0e4fa8d763aeb36485ebf13956c109f..33bebd04ccd44821dfd8106b18e012e50384acc8 100644 (file)
@@ -377,7 +377,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("sparks"), hitloc, force*-1, 1);
+       pointparticles(particleeffectnum(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);
@@ -387,7 +387,7 @@ void ons_ControlPoint_Icon_Damage(entity inflictor, entity attacker, float damag
        if (self.health < 0)
        {
                sound(self, CH_TRIGGER, W_Sound("grenade_impact"), VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+               pointparticles(particleeffectnum(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);
@@ -492,7 +492,7 @@ void ons_ControlPoint_Icon_Think()
        // damaged fx
        if(random() < 0.6 - self.health / self.max_health)
        {
-               Send_Effect("electricity_sparks", self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
+               Send_Effect(EFFECT_ELECTRIC_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);
@@ -526,7 +526,7 @@ void ons_ControlPoint_Icon_BuildThink()
                self.owner.iscaptured = true;
                self.solid = SOLID_BBOX;
 
-               Send_Effect(sprintf("%s_cap", Static_Team_ColorName_Lower(self.owner.team)), self.owner.origin, '0 0 0', 1);
+               Send_Effect_(sprintf("%s_cap", Static_Team_ColorName_Lower(self.owner.team)), self.owner.origin, '0 0 0', 1);
 
                WaypointSprite_UpdateMaxHealth(self.owner.sprite, self.max_health);
                WaypointSprite_UpdateHealth(self.owner.sprite, self.health);
@@ -557,7 +557,7 @@ void ons_ControlPoint_Icon_BuildThink()
                setmodel_fixsize(self.owner, "models/onslaught/controlpoint_pad2.md3");
 
        if(random() < 0.9 - self.health / self.max_health)
-               Send_Effect("rage", self.origin + 10 * randomvec(), '0 0 -1', 1);
+               Send_Effect(EFFECT_RAGE, self.origin + 10 * randomvec(), '0 0 -1', 1);
 }
 
 void ons_ControlPoint_Icon_Spawn(entity cp, entity player)
@@ -585,7 +585,7 @@ void ons_ControlPoint_Icon_Spawn(entity cp, entity player)
        cp.team = e.team;
        cp.colormap = e.colormap;
 
-       Send_Effect(sprintf("%sflag_touch", Static_Team_ColorName_Lower(player.team)), e.origin, '0 0 0', 1);
+       Send_Effect_(sprintf("%sflag_touch", Static_Team_ColorName_Lower(player.team)), e.origin, '0 0 0', 1);
 
        WaypointSprite_UpdateBuildFinished(cp.sprite, time + (e.max_health - e.health) / (e.count / ONS_CP_THINKRATE));
        WaypointSprite_UpdateRule(cp.sprite,cp.team,SPRITERULE_TEAMPLAY);
@@ -912,7 +912,7 @@ void ons_GeneratorDamage(entity inflictor, entity attacker, float damage, int de
        else
        {
                // particles on every hit
-               Send_Effect("sparks", hitloc, force * -1, 1);
+               Send_Effect(EFFECT_SPARKS, hitloc, force * -1, 1);
 
                //sound on every hit
                if (random() < 0.5)
@@ -1678,7 +1678,7 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe
                        {
                                if ( tele_effects )
                                {
-                                       Send_Effect("teleport", player.origin, '0 0 0', 1);
+                                       Send_Effect(EFFECT_TELEPORT, player.origin, '0 0 0', 1);
                                        sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTEN_NORM);
                                }
                                setorigin(player, loc);
@@ -1688,7 +1688,7 @@ bool ons_Teleport(entity player, entity tele_target, float range, bool tele_effe
                                player.teleport_antispam = time + autocvar_g_onslaught_teleport_wait;
 
                                if ( tele_effects )
-                                       Send_Effect("teleport", player.origin + v_forward * 32, '0 0 0', 1);
+                                       Send_Effect(EFFECT_TELEPORT, player.origin + v_forward * 32, '0 0 0', 1);
                                return true;
                        }
                }
index d4bdd50d2974a5005a4d2b9f872d002b6aaec24d..72bbaf16d4386e60c759c20401eccd86f6386273 100644 (file)
@@ -67,7 +67,7 @@ void buff_Effect(entity player, string eff)
 
        if(time >= self.buff_effect_delay)
        {
-               Send_Effect(eff, player.origin + ((player.mins + player.maxs) * 0.5), '0 0 0', 1);
+               Send_Effect_(eff, player.origin + ((player.mins + player.maxs) * 0.5), '0 0 0', 1);
                self.buff_effect_delay = time + 0.05; // prevent spam
        }
 }
@@ -132,8 +132,8 @@ void buff_Respawn(entity ent)
        if(autocvar_g_buffs_random_lifetime > 0)
                ent.lifetime = time + autocvar_g_buffs_random_lifetime;
 
-       Send_Effect("electro_combo", oldbufforigin + ((ent.mins + ent.maxs) * 0.5), '0 0 0', 1);
-       Send_Effect("electro_combo", CENTER_OR_VIEWOFS(ent), '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, oldbufforigin + ((ent.mins + ent.maxs) * 0.5), '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_COMBO, CENTER_OR_VIEWOFS(ent), '0 0 0', 1);
 
        WaypointSprite_Ping(ent.buff_waypoint);
 
@@ -182,7 +182,7 @@ void buff_Touch()
        Send_Notification(NOTIF_ONE, other, MSG_MULTI, ITEM_BUFF_GOT, buffid);
        Send_Notification(NOTIF_ALL_EXCEPT, other, MSG_INFO, INFO_ITEM_BUFF, other.netname, buffid);
 
-       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        sound(other, CH_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);
        other.buffs |= (self.buffs);
 }
@@ -264,7 +264,7 @@ void buff_Think()
                {
                        self.buff_active = true;
                        sound(self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);
-                       Send_Effect("item_respawn", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+                       Send_Effect(EFFECT_ITEM_RESPAWN, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
                }
        }
 
@@ -651,8 +651,8 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThrowKey)
                        closest.pushltime = time + autocvar_g_maxpushtime;
                        closest.istypefrag = closest.BUTTON_CHAT;
 
-                       Send_Effect("electro_combo", their_org, '0 0 0', 1);
-                       Send_Effect("electro_combo", my_org, '0 0 0', 1);
+                       Send_Effect(EFFECT_ELECTRO_COMBO, their_org, '0 0 0', 1);
+                       Send_Effect(EFFECT_ELECTRO_COMBO, my_org, '0 0 0', 1);
 
                        sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NORM);
                        sound(closest, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NORM);
@@ -740,7 +740,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink)
        if(time < self.buff_disability_time)
        if(time >= self.buff_disability_effect_time)
        {
-               Send_Effect("smoking", self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1);
+               Send_Effect(EFFECT_SMOKING, self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1);
                self.buff_disability_effect_time = time + 0.5;
        }
 
index 3054c40d25df94835abb022357c2e947737e4aef..bd8cb189616244a34f22619ab452cf2d959cd19c 100644 (file)
@@ -77,8 +77,8 @@ void napalm_damage(float dist, float damage, float edgedamage, float burntime)
                d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, self.origin) - RandomSelection_chosen_ent.fireball_impactvec);
                d = damage + (edgedamage - damage) * (d / dist);
                Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
-               //trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
-               Send_Effect("fireball_laser", self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+               //trailparticles(self, particleeffectnum(EFFECT_FIREBALL_LASER), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
+               Send_Effect(EFFECT_FIREBALL_LASER, self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
        }
 }
 
@@ -225,7 +225,7 @@ void nade_napalm_boom()
 void nade_ice_freeze(entity freezefield, entity frost_target, float freeze_time)
 {
        frost_target.frozen_by = freezefield.realowner;
-       Send_Effect("electro_impact", frost_target.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_IMPACT, frost_target.origin, '0 0 0', 1);
        Freeze(frost_target, 1/freeze_time, 3, false);
        if(frost_target.ballcarried)
        if(g_keepaway) { ka_DropEvent(frost_target); }
@@ -250,14 +250,14 @@ void nade_ice_think()
        {
                if ( autocvar_g_nades_ice_explode )
                {
-                       string expef;
+                       entity expef = NULL;
                        switch(self.realowner.team)
                        {
-                               case NUM_TEAM_1: expef = "nade_red_explode"; break;
-                               case NUM_TEAM_2: expef = "nade_blue_explode"; break;
-                               case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
-                               case NUM_TEAM_4: expef = "nade_pink_explode"; break;
-                               default:                 expef = "nade_neutral_explode"; break;
+                               case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
+                               case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
+                               case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
+                               case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
+                               default:                 expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
                        }
                        Send_Effect(expef, self.origin + '0 0 1', '0 0 0', 1);
                        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
@@ -284,15 +284,15 @@ void nade_ice_think()
        randomp.x = randomr*cos(randomw);
        randomp.y = randomr*sin(randomw);
        randomp.z = 1;
-       Send_Effect("electro_muzzleflash", self.origin + randomp, '0 0 0', 1);
+       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, self.origin + randomp, '0 0 0', 1);
 
        if(time >= self.nade_special_time)
        {
                self.nade_special_time = time+0.7;
 
 
-               Send_Effect("electro_impact", self.origin, '0 0 0', 1);
-               Send_Effect("icefield", self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_ELECTRO_IMPACT, self.origin, '0 0 0', 1);
+               Send_Effect(EFFECT_ICEFIELD, self.origin, '0 0 0', 1);
        }
 
 
@@ -426,7 +426,7 @@ void nade_heal_touch()
                        if ( other.health < maxhealth )
                        {
                                if ( self.nade_show_particles )
-                                       Send_Effect("healing_fx", other.origin, '0 0 0', 1);
+                                       Send_Effect(EFFECT_HEALING, other.origin, '0 0 0', 1);
                                other.health = min(other.health+health_factor, maxhealth);
                        }
                        other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
@@ -483,53 +483,52 @@ void nade_monster_boom()
 
 void nade_boom()
 {
-       string expef;
+       entity expef = NULL;
        bool nade_blast = true;
 
        switch ( NADES[self.nade_type] )
        {
                case NADE_TYPE_NAPALM:
                        nade_blast = autocvar_g_nades_napalm_blast;
-                       expef = "explosion_medium";
+                       expef = EFFECT_EXPLOSION_MEDIUM;
                        break;
                case NADE_TYPE_ICE:
                        nade_blast = false;
-                       expef = "electro_combo"; // hookbomb_explode electro_combo bigplasma_impact
+                       expef = EFFECT_ELECTRO_COMBO; // hookbomb_explode electro_combo bigplasma_impact
                        break;
                case NADE_TYPE_TRANSLOCATE:
                        nade_blast = false;
-                       expef = "";
                        break;
                case NADE_TYPE_MONSTER:
                case NADE_TYPE_SPAWN:
                        nade_blast = false;
                        switch(self.realowner.team)
                        {
-                               case NUM_TEAM_1: expef = "spawn_event_red"; break;
-                               case NUM_TEAM_2: expef = "spawn_event_blue"; break;
-                               case NUM_TEAM_3: expef = "spawn_event_yellow"; break;
-                               case NUM_TEAM_4: expef = "spawn_event_pink"; break;
-                               default: expef = "spawn_event_neutral"; break;
+                               case NUM_TEAM_1: expef = EFFECT_SPAWN_RED; break;
+                               case NUM_TEAM_2: expef = EFFECT_SPAWN_BLUE; break;
+                               case NUM_TEAM_3: expef = EFFECT_SPAWN_YELLOW; break;
+                               case NUM_TEAM_4: expef = EFFECT_SPAWN_PINK; break;
+                               default: expef = EFFECT_SPAWN_NEUTRAL; break;
                        }
                        break;
                case NADE_TYPE_HEAL:
                        nade_blast = false;
-                       expef = "spawn_event_red";
+                       expef = EFFECT_SPAWN_RED;
                        break;
 
                default:
                case NADE_TYPE_NORMAL:
                        switch(self.realowner.team)
                        {
-                               case NUM_TEAM_1: expef = "nade_red_explode"; break;
-                               case NUM_TEAM_2: expef = "nade_blue_explode"; break;
-                               case NUM_TEAM_3: expef = "nade_yellow_explode"; break;
-                               case NUM_TEAM_4: expef = "nade_pink_explode"; break;
-                               default:                 expef = "nade_neutral_explode"; break;
+                               case NUM_TEAM_1: expef = EFFECT_NADE_RED_EXPLODE; break;
+                               case NUM_TEAM_2: expef = EFFECT_NADE_BLUE_EXPLODE; break;
+                               case NUM_TEAM_3: expef = EFFECT_NADE_YELLOW_EXPLODE; break;
+                               case NUM_TEAM_4: expef = EFFECT_NADE_PINK_EXPLODE; break;
+                               default:                 expef = EFFECT_NADE_NEUTRAL_EXPLODE; break;
                        }
        }
 
-       if(expef != "")
+       if(expef)
                Send_Effect(expef, findbetterlocation(self.origin, 8), '0 0 0', 1);
 
        sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
@@ -779,7 +778,7 @@ float nade_customize()
        {
                //self.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
                if(!self.traileffectnum)
-                       self.traileffectnum = particleeffectnum(Nade_TrailEffect(NADES[self.nade_type].m_projectile[false], self.team));
+                       self.traileffectnum = _particleeffectnum(Nade_TrailEffect(NADES[self.nade_type].m_projectile[false], self.team));
                self.alpha = 1;
        }
 
@@ -819,7 +818,7 @@ void nade_prime()
        //setattachment(n, self, "bip01 l hand");
        n.exteriormodeltoclient = self;
        n.customizeentityforclient = nade_customize;
-       n.traileffectnum = particleeffectnum(Nade_TrailEffect(NADES[n.nade_type].m_projectile[false], self.team));
+       n.traileffectnum = _particleeffectnum(Nade_TrailEffect(NADES[n.nade_type].m_projectile[false], self.team));
        n.colormod = NADES[n.nade_type].m_color;
        n.realowner = self;
        n.colormap = self.colormap;
@@ -1120,7 +1119,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDamage)
        {
                Unfreeze(frag_target);
                frag_target.health = autocvar_g_freezetag_revive_nade_health;
-               Send_Effect("iceorglass", frag_target.origin, '0 0 0', 3);
+               Send_Effect(EFFECT_ICEORGLASS, frag_target.origin, '0 0 0', 3);
                frag_damage = 0;
                frag_force = '0 0 0';
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_NADE, frag_target.netname);
index 5ceeff34b5f4ab365744a9c8d999e7fe6036fedd..3c0e2706f8d8f52c16406de17ff03e86b16604ee 100644 (file)
@@ -11,7 +11,7 @@ void PlayerTouchExplode(entity p1, entity p2)
        org.z += (p1.mins.z + p2.mins.z) * 0.5;
 
        sound(self, CH_TRIGGER, W_Sound("grenade_impact"), VOL_BASE, ATTEN_NORM);
-       Send_Effect("explosion_small", org, '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_SMALL, org, '0 0 0', 1);
 
        entity e;
        e = spawn();
index 6e11abcd20ee436c5fb215504ae965f56f94aa77..273e25e3f959df6da6bb578f1c921035aef79a5b 100644 (file)
@@ -31,7 +31,7 @@ void sandbox_ObjectFunction_Touch()
        intensity = bound(0, intensity * autocvar_g_sandbox_object_material_velocity_factor, 1);
 
        sound(self, CH_TRIGGER, strcat("object/impact_", self.material, "_", ftos(ceil(random() * 5)) , ".wav"), VOL_BASE * intensity, ATTEN_NORM);
-       Send_Effect(strcat("impact_", self.material), self.origin, '0 0 0', ceil(intensity * 10)); // allow a count from 1 to 10
+       Send_Effect_(strcat("impact_", self.material), self.origin, '0 0 0', ceil(intensity * 10)); // allow a count from 1 to 10
 }
 
 void sandbox_ObjectFunction_Think()
index 7bb6332b07d381f1725d9e9e808dfd2a53b94e6b..09cd6e9d20810481f2adb9dceb18d16271ee5927 100644 (file)
@@ -415,7 +415,7 @@ void Portal_Remove(entity portal, float killed)
        {
                fixedmakevectors(portal.mangle);
                sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTEN_NORM);
-               Send_Effect("rocket_explode", portal.origin + v_forward * 16, v_forward * 1024, 4);
+               Send_Effect(EFFECT_ROCKET_EXPLODE, portal.origin + v_forward * 16, v_forward * 1024, 4);
                remove(portal);
        }
        else
index 01af275528d2d2a0b1881ae378cc95e38c1a8677..e57d56dd169be0022cd881bc00d32e581f8e5842 100644 (file)
@@ -498,7 +498,7 @@ vector steerlib_beamsteer(vector dir, float length, float step, float step_up, f
 #ifdef TLIBS_TETSLIBS
 void flocker_die()
 {
-       Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_ROCKET_EXPLODE, self.origin, '0 0 0', 1);
 
     self.owner.cnt += 1;
     self.owner = world;
index f883fd9e683be03549b957c57411a16e817fd6ff..858a76198b9a78aaa1dd61d26729c77dba9a2794 100644 (file)
@@ -438,8 +438,8 @@ void Item_Respawn (void)
        self.think = Item_Think;
        self.nextthink = time;
 
-       //Send_Effect("item_respawn", self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
-       Send_Effect("item_respawn", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       //Send_Effect(EFFECT_ITEM_RESPAWN, self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_RESPAWN, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
 }
 
 void Item_RespawnCountdown (void)
@@ -733,7 +733,7 @@ void Item_Touch (void)
 
        other.last_pickup = time;
 
-       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        sound (other, CH_TRIGGER, self.item_pickupsound, VOL_BASE, ATTEN_NORM);
 
        if (self.classname == "droppedweapon")
@@ -812,7 +812,7 @@ void Item_FindTeam()
 // TODO: perhaps nice special effect?
 void RemoveItem(void)
 {
-       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        remove(self);
 }
 
index c9585d1bb60410e8dc0d1db7372c37751b747a14..eec32a3e51ac0339bf9c764d992b15aa3b942b90 100644 (file)
@@ -357,11 +357,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("tr_rifle");
+               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_RIFLE);
        else if(tracereffects & EF_BLUE)
-               fireBullet_trace_callback_eff = particleeffectnum("tr_rifle_weak");
+               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_RIFLE_WEAK);
        else
-               fireBullet_trace_callback_eff = particleeffectnum("tr_bullet");
+               fireBullet_trace_callback_eff = particleeffectnum(EFFECT_BULLET);
 
        float lag = ANTILAG_LATENCY(self);
        if(lag < 0.001)