]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Send effects to client, allows mismatching effectinfo.txt
authorMario <zacjardine@y7mail.com>
Fri, 21 Aug 2015 05:31:38 +0000 (15:31 +1000)
committerMario <zacjardine@y7mail.com>
Fri, 21 Aug 2015 05:31:38 +0000 (15:31 +1000)
59 files changed:
qcsrc/client/main.qc
qcsrc/client/progs.src
qcsrc/common/constants.qh
qcsrc/common/effects.qc [new file with mode: 0644]
qcsrc/common/effects.qh [new file with mode: 0644]
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/teleporters.qc
qcsrc/common/triggers/trigger/jumppads.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_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_shotgun.qc
qcsrc/common/weapons/w_tuba.qc
qcsrc/common/weapons/w_vaporizer.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.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_nexball.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/progs.src
qcsrc/server/steerlib.qc
qcsrc/server/t_items.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_flac.qc
qcsrc/server/tturrets/units/unit_plasma.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicle.qc

index b56887878d392b9651ed518a19d3f4f2f8f65135..872b7f9baab126e0b6520ac312bce656681af590 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "../common/buffs.qh"
 #include "../common/deathtypes.qh"
+#include "../common/effects.qh"
 #include "../common/mapinfo.qh"
 #include "../common/monsters/all.qh"
 #include "../common/nades.qh"
@@ -145,6 +146,7 @@ void CSQC_Init(void)
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
        CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
+       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        WaypointSprite_Load();
 
@@ -886,6 +888,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_KEYLOCK: ent_keylock(); break;
                case ENT_CLIENT_TRAIN: ent_train(); break;
                case ENT_CLIENT_TRIGGER_IMPULSE: ent_trigger_impulse(); break;
+               case ENT_CLIENT_EFFECT: Read_Effect(bIsNewEntity); break;
 
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
index d161c6dfc60b09ff502b2cfa4bb24c313ade789d..db8817818c5cd6d8a6c331dbe59ffeea1c3e0cb9 100644 (file)
@@ -44,6 +44,7 @@ weapons/projectile.qc // TODO
 
 ../common/animdecide.qc
 ../common/buffs.qc
+../common/effects.qc
 ../common/mapinfo.qc
 ../common/movetypes/include.qc
 ../common/nades.qc
index 61c08bf86f3c1b1f201a986739f57db4fc6ba2a1..901c4bb0fb1b5d921d81480bb84baa583cb5db5b 100644 (file)
@@ -115,6 +115,7 @@ const int ENT_CLIENT_TRIGGER_IMPULSE = 68;
 const int ENT_CLIENT_SWAMP = 69;
 const int ENT_CLIENT_CORNER = 70;
 const int ENT_CLIENT_KEYLOCK = 71;
+const int ENT_CLIENT_EFFECT = 72;
 const int ENT_CLIENT_VIEWLOC = 78;
 const int ENT_CLIENT_VIEWLOC_TRIGGER = 79;
 
diff --git a/qcsrc/common/effects.qc b/qcsrc/common/effects.qc
new file mode 100644 (file)
index 0000000..8fe7a97
--- /dev/null
@@ -0,0 +1,118 @@
+void Create_Effect_Entity(float eff_name, string eff_string, float 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(float is_new)
+{
+#if EFFECTS_COUNT >= 255
+       float net_name = ReadShort();
+#else
+       float net_name = ReadByte();
+#endif
+
+       entity eff = effects_ent[net_name - 1];
+
+       vector v, vel = '0 0 0';
+       float eff_cnt = 1;
+       float eff_trail = eff.eent_eff_trail;
+       v_x = ReadCoord();
+       v_y = ReadCoord();
+       v_z = ReadCoord();
+
+       float use_vel = ReadByte();
+       if(use_vel)
+       {
+               vel_x = ReadCoord();
+               vel_y = ReadCoord();
+               vel_z = ReadCoord();
+       }
+       
+       if(!eff_trail)
+               eff_cnt = ReadByte();
+
+       if(is_new)
+       if(eff_trail)
+               WarpZone_TrailParticles(world, particleeffectnum(eff.eent_eff_name), v, vel);
+       else
+               pointparticles(particleeffectnum(eff.eent_eff_name), v, vel, eff_cnt);
+}
+#endif
+
+#ifdef SVQC
+float Net_Write_Effect(entity client, float sf)
+{
+       WriteByte(MSG_ENTITY, ENT_CLIENT_EFFECT);
+#if EFFECTS_COUNT >= 255
+       WriteShort(MSG_ENTITY, self.eent_net_name);
+#else
+       WriteByte(MSG_ENTITY, self.eent_net_name);
+#endif
+       WriteCoord(MSG_ENTITY, self.eent_net_location_x);
+       WriteCoord(MSG_ENTITY, self.eent_net_location_y);
+       WriteCoord(MSG_ENTITY, self.eent_net_location_z);
+
+       // attempt to save a tiny bit more bandwidth by not sending velocity if it isn't set
+       if(self.eent_net_velocity)
+       {
+               WriteByte(MSG_ENTITY, true);
+               WriteCoord(MSG_ENTITY, self.eent_net_velocity_x);
+               WriteCoord(MSG_ENTITY, self.eent_net_velocity_y);
+               WriteCoord(MSG_ENTITY, self.eent_net_velocity_z);
+       }
+       else { WriteByte(MSG_ENTITY, false); }
+
+       if(!self.eent_eff_trail) { WriteByte(MSG_ENTITY, self.eent_net_count); }
+       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)
+{
+       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.eent_net_velocity = eff_vel;
+       net_eff.eent_net_location = eff_loc;
+       net_eff.eent_net_count = eff_cnt;
+       net_eff.eent_eff_trail = eff.eent_eff_trail;
+
+       net_eff.think = SUB_Remove;
+       net_eff.nextthink = time + 0.2; // don't need to keep this long
+
+       Net_LinkEntity(net_eff, false, 0, Net_Write_Effect);
+}
+#endif
\ No newline at end of file
diff --git a/qcsrc/common/effects.qh b/qcsrc/common/effects.qh
new file mode 100644 (file)
index 0000000..2b64581
--- /dev/null
@@ -0,0 +1,163 @@
+#ifndef P_EFFECTS_H
+#define P_EFFECTS_H
+// 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")
+#define EFFECTS \
+    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") 
+
+
+
+
+// --------------------
+// --------------------------
+// -----------------------------------
+// ------------------------------------------|
+// some stuff you don't need to care about...|
+// ------------------------------------------|
+// -----------------------------------
+// --------------------------
+// --------------------
+
+.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, float eff_cnt);
+#endif
+
+const int EFFECT_FIRST = 1;
+int EFFECT_COUNT;
+
+const int MAX_EFFECTS = 512;
+entity effects_ent[MAX_EFFECTS];
+
+void Create_Effect_Entity(int eff_name, string eff_string, int eff_trail);
+
+#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);
+
+void RegisterEffects_First()
+{
+    #ifdef SVQC
+    #define dedi (server_is_dedicated ? "a dedicated " : "")
+    #else
+    #define dedi ""
+    #endif
+
+    dprintf("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME);
+    #undef dedi
+}
+
+void RegisterEffects_Done()
+{
+    dprint("Effects initialization successful!\n");
+}
+
+// NOW we actually activate the declarations
+ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_First);
+EFFECTS
+ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_Done);
+#undef EFFECT
+
+#endif
index ec1e4be31cb5d6dcaaa8fc3552760fe20e6c7f53..bbf9ddb1c84422d7c4566d29824a6b05186b9087 100644 (file)
@@ -90,7 +90,7 @@ void mage_spike_explode()
 
        self.realowner.mage_spike = world;
 
-       pointparticles(particleeffectnum("explosion_small"), self.origin, '0 0 0', 1);
+       Send_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);
@@ -232,11 +232,11 @@ void mage_heal()
                                        break;
                        }
 
-                       pointparticles(particleeffectnum(fx), head.origin, '0 0 0', 1);
+                       Send_Effect(fx, head.origin, '0 0 0', 1);
                }
                else
                {
-                       pointparticles(particleeffectnum("healing_fx"), head.origin, '0 0 0', 1);
+                       Send_Effect("healing_fx", 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, "weapons/tagexp1.wav", 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);
-       pointparticles(particleeffectnum("TE_EXPLOSION"), self.origin, '0 0 0', 1);
+       Send_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;
 
-       pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1);
+       Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1);
        setorigin(self, self.enemy.origin + ((v_forward * -1) * 200));
 
        self.attack_finished_single = time + 0.2;
index 986a0e10f7258618f890fe8f452ea4f023406f18..df796b5188a19b0a84fc81d2192f3eba035bbba9 100644 (file)
@@ -43,7 +43,7 @@ const float shambler_anim_death               = 8;
 void shambler_smash()
 {
        makevectors(self.angles);
-       pointparticles(particleeffectnum("explosion_medium"), (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
+       Send_Effect("explosion_medium", (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", 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, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("electro_impact"), '0 0 0', '0 0 0', 1);
+       Send_Effect("electro_impact", '0 0 0', '0 0 0', 1);
 
        self.event_damage = func_null;
        self.takedamage = DAMAGE_NO;
index c6d4bc7d5256976ba66018fdc75df87e2150b017..65ba8dad5364e4bd96df9a9832136dcd653a4ef3 100644 (file)
@@ -38,7 +38,7 @@ void spider_web_explode()
        entity e;
        if(self)
        {
-               pointparticles(particleeffectnum("electro_impact"), self.origin, '0 0 0', 1);
+               Send_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 75e267016cfed0fe8cb9fb1613bceaf7339a9e18..849abc36c395dd9ed4bec60788fd64027176b9eb 100644 (file)
@@ -37,7 +37,7 @@ void wyvern_fireball_explode()
        entity e;
        if(self)
        {
-               pointparticles(particleeffectnum("fireball_explode"), self.origin, '0 0 0', 1);
+               Send_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 ab7cd135a11ea4191a53648d2d4977024f0e2728..8658b437f774f2831eb8d1ba4a9f175ac135ab03 100644 (file)
@@ -842,7 +842,7 @@ void monster_remove(entity mon)
        if(!mon)
                return; // nothing to remove
 
-       pointparticles(particleeffectnum("item_pickup"), mon.origin, '0 0 0', 1);
+       Send_Effect("item_pickup", mon.origin, '0 0 0', 1);
 
        if(mon.weaponentity)
                remove(mon.weaponentity);
index e36cdb01bd18c09a522505bd41f1676bad878343..15d7035ce68e32f9731f13b51b3b9fd760dfc586 100644 (file)
@@ -213,7 +213,7 @@ void func_breakable_destroy() {
                RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, world, self.dmg_force, DEATH_HURTTRIGGER, world);
 
        if(self.cnt)
-               pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
+               Send_Effect((effects_ent[self.cnt - 1]).eent_eff_name, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
 
        if(self.respawntime)
        {
index a5d89f50bb6035f5f8832869729a94da146fa368..3a4022641ce2f137e876e3eacf5ba06617573e45 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)
                        {
-                               pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
-                               pointparticles(particleeffectnum("teleport"), to + v_forward * 32, '0 0 0', 1);
+                               Send_Effect("teleport", player.origin, '0 0 0', 1);
+                               Send_Effect("teleport", to + v_forward * 32, '0 0 0', 1);
                        }
                        self.pushltime = time + 0.2;
                }
index 6c6675e113f14b6ca5645f4d3e34a094f482a4ee..b14078fb41a970b3eb176002ff189e5e149b4d3d 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
-                       pointparticles(particleeffectnum("jumppad_activate"), other.origin, other.velocity, 1);
+                       Send_Effect("jumppad_activate", other.origin, other.velocity, 1);
                        sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
                        self.pushltime = time + 0.2;
                }
index 79d4dc7c7ad99fea7663a8f9cc4d6289d9d74efa..f7b8ac0dc2d4aa7b06730c7b920d1d46657302aa 100644 (file)
@@ -264,7 +264,7 @@ void W_Arc_Beam_Think(void)
 
                        if ( WEP_CVAR(arc, overheat_max) > 0 && self.beam_heat >= WEP_CVAR(arc, overheat_max) )
                        {
-                               pointparticles( particleeffectnum("arc_overheat"),
+                               Send_Effect("arc_overheat",
                                        self.beam_start, self.beam_wantdir, 1 );
                                sound(self, CH_WEAPON_A, "weapons/arc_stop.wav", VOL_BASE, ATTN_NORM);
                        }
@@ -609,10 +609,10 @@ void Arc_Smoke()
        if ( self.arc_overheat > time )
        {
                if ( random() < self.arc_heat_percent )
-                       pointparticles( particleeffectnum("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 )
                {
-                       pointparticles( particleeffectnum("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;
@@ -625,7 +625,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) ) )
-                       pointparticles( particleeffectnum("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 ||
index 1e41f9df891fae2f1f4dd01800a9aa79cd6736f5..31a5151facd2befa3420043a0632961e83aed4e7 100644 (file)
@@ -95,7 +95,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, "weapons/lasergun_fire.wav", CH_WEAPON_B, atk_damage);
-       pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        entity missile = spawn();
        missile.owner = missile.realowner = self;
index 0825103d478cba33beafb529c78243f770a6ba60..e9163ad59b0f3623dd9bc8cfe679cae9cf60c0d8 100644 (file)
@@ -257,7 +257,7 @@ void W_Crylink_LinkJoinEffect_Think(void)
                                        e.projectiledeathtype,
                                        other
                                );
-                               pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+                               Send_Effect("crylink_joinexplode", self.origin, '0 0 0', n);
                        }
                }
        }
@@ -359,7 +359,7 @@ void W_Crylink_Attack(void)
        up = v_up;
 
        shots = WEP_CVAR_PRI(crylink, shots);
-       pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+       Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
        proj = prevproj = firstproj = world;
        for(counter = 0; counter < shots; ++counter)
        {
@@ -468,7 +468,7 @@ void W_Crylink_Attack2(void)
        up = v_up;
 
        shots = WEP_CVAR_SEC(crylink, shots);
-       pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+       Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
        proj = prevproj = firstproj = world;
        for(counter = 0; counter < shots; ++counter)
        {
index 0dd8f80f74c85518d73983a2fb21dad01c52e68f..2dde60b988781581d67cb0e046452e4c9db2366f 100644 (file)
@@ -292,7 +292,7 @@ void W_Devastator_Think(void)
 
                        if(!self.count)
                        {
-                               pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
+                               Send_Effect("rocket_guide", self.origin, self.velocity, 1);
                                // TODO add a better sound here
                                sound(self.realowner, CH_WEAPON_B, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
                                self.count = 1;
@@ -342,7 +342,7 @@ void W_Devastator_Attack(void)
        W_DecreaseAmmo(WEP_CVAR(devastator, ammo));
 
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 5, "weapons/rocket_fire.wav", CH_WEAPON_A, WEP_CVAR(devastator, damage));
-       pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
index 0a219392ee48115e72001ce83b4180739dd5a4f1..6fb0c26df3461c389268e8deca6aaf30dcbaa7a4 100644 (file)
@@ -259,7 +259,7 @@ void W_Electro_Attack_Bolt(void)
                WEP_CVAR_PRI(electro, damage)
        );
 
-       pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("electro_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.classname = "electro_bolt";
@@ -359,7 +359,7 @@ void W_Electro_Attack_Orb(void)
 
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("electro_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        entity proj = spawn();
        proj.classname = "electro_orb";
index 112b6524eade596d0601257b7507cd508a4ca006..1cec08e9691fb0cc7fb1f611bf11cd5e14965cb2 100644 (file)
@@ -99,7 +99,7 @@ void W_Fireball_Explode(void)
                                accuracy_add(self.realowner, WEP_FIREBALL, 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);
-                       pointparticles(particleeffectnum("fireball_bfgdamage"), e.origin, -1 * dir, 1);
+                       Send_Effect("fireball_bfgdamage", e.origin, -1 * dir, 1);
                }
        }
 
@@ -142,7 +142,7 @@ void W_Fireball_LaserPlay(float dt, float dist, float damage, float edgedamage,
                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);
-               pointparticles(particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+               Send_Effect("fireball_laser", self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
        }
 }
 
@@ -183,7 +183,7 @@ void W_Fireball_Attack1(void)
 
        W_SetupShot_ProjectileSize(self, '-16 -16 -16', '16 16 16', false, 2, "weapons/fireball_fire2.wav", CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage));
 
-       pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("fireball_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.classname = "plasma_prim";
@@ -220,7 +220,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;
-       pointparticles(particleeffectnum("fireball_preattack_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("fireball_preattack_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 }
 
 void W_Fireball_Attack1_Frame4(void)
@@ -319,7 +319,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;
 
-       pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("fireball_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        proj = spawn();
        proj.owner = proj.realowner = self;
index 808d7733af18fe718d885c24ca40303165dfeac3..5c5f418f96662e92118db4b17ab65846faa402cd 100644 (file)
@@ -113,7 +113,7 @@ void W_Hagar_Touch2(void)
                self.use();
        } else {
                self.cnt++;
-               pointparticles(particleeffectnum("hagar_bounce"), self.origin, self.velocity, 1);
+               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
                self.angles = vectoangles(self.velocity);
                self.owner = world;
                self.projectiledeathtype |= HITTYPE_BOUNCE;
@@ -128,7 +128,7 @@ void W_Hagar_Attack(void)
 
        W_SetupShot(self, false, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage));
 
-       pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -171,7 +171,7 @@ void W_Hagar_Attack2(void)
 
        W_SetupShot(self, false, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
 
-       pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
@@ -223,7 +223,7 @@ void W_Hagar_Attack2_Load_Release(void)
        weapon_prepareattack_do(1, WEP_CVAR_SEC(hagar, refire));
 
        W_SetupShot(self, false, 2, "weapons/hagar_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage));
-       pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        forward = v_forward;
        right = v_right;
index e9c7ffee4802185c99108c547bcfb64cbc4c5113..ab5566992a766651bad4e839bd48df141e04bdb9 100644 (file)
@@ -77,7 +77,7 @@ void W_HLAC_Attack(void)
         spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage));
-       pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
        if(!autocvar_g_norecoil)
        {
                self.punchangle_x = random() - 0.5;
@@ -125,7 +125,7 @@ void W_HLAC_Attack2(void)
         spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod);
 
        W_SetupShot(self, false, 3, "weapons/lasergun_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage));
-       pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("laser_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn();
        missile.owner = missile.realowner = self;
index de9c983b2850f24f6777f687f50975eb43ce24d1..3aa052531b3074e8dbb494a0fac0c1439b294248 100644 (file)
@@ -73,7 +73,7 @@ void W_HeavyMachineGun_Attack_Auto()
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
-       pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
index 24a0db83f44534a4c7ff3cfbd453851b86796621..56a89fd9dcf77f3bca61f0669a077d4edec2c51a 100644 (file)
@@ -118,7 +118,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);
 
-       pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -191,7 +191,7 @@ void W_MachineGun_Attack_Auto(void)
 
        self.misc_bulletcounter = self.misc_bulletcounter + 1;
 
-       pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
@@ -214,7 +214,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, 0);
 
-       pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("uzi_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        W_MachineGun_MuzzleFlash();
        W_AttachToShotorg(self.muzzle_flash, '5 0 0');
index 32d999612b149ded8b93f3cf1042e5e5d3a602cd..45fdb0573e5650d55e393a57e50c779d2bfc129a 100644 (file)
@@ -327,7 +327,7 @@ void W_MineLayer_Attack(void)
        W_DecreaseAmmo(WEP_CVAR(minelayer, ammo));
 
        W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', false, 5, "weapons/mine_fire.wav", CH_WEAPON_A, WEP_CVAR(minelayer, damage));
-       pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        mine = WarpZone_RefSys_SpawnSameRefSys(self);
        mine.owner = mine.realowner = self;
index a8c6a2c59e3e56c946e2c6d7d4ab409bf8b441fc..a2ac41c49a5d3bf2d7f9ebb049de87f07dd05ab5 100644 (file)
@@ -150,7 +150,7 @@ void W_Mortar_Grenade_Touch1(void)
                        spamsound(self, CH_SHOTS, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
                else
                        spamsound(self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
-               pointparticles(particleeffectnum("hagar_bounce"), self.origin, self.velocity, 1);
+               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
        }
@@ -195,7 +195,7 @@ void W_Mortar_Grenade_Touch2(void)
                        spamsound(self, CH_SHOTS, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
                else
                        spamsound(self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
-               pointparticles(particleeffectnum("hagar_bounce"), self.origin, self.velocity, 1);
+               Send_Effect("hagar_bounce", self.origin, self.velocity, 1);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
 
@@ -230,7 +230,7 @@ void W_Mortar_Attack(void)
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.owner = gren.realowner = self;
@@ -279,7 +279,7 @@ void W_Mortar_Attack2(void)
        W_SetupShot_ProjectileSize(self, '-3 -3 -3', '3 3 3', false, 4, "weapons/grenade_fire.wav", CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
-       pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.owner = gren.realowner = self;
index 40964891d2bdcf849702533fd893214fc9c63b9e..909e5db4a418d77d7de2645b038874c2eb21eb2d 100644 (file)
@@ -242,7 +242,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;
 
-       //pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       //Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        gren = spawn();
        gren.cnt = type;
index 16d6ad6f833925fb510fe37d8182b758a10ea4c8..50ccc4e96a0f02d8474ce61eae33050e863b580d 100644 (file)
@@ -58,7 +58,7 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolid
 
        W_SetupShot(self, true, 2, pSound, CH_WEAPON_A, pDamage * pShots);
 
-       pointparticles(particleeffectnum("rifle_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
+       Send_Effect("rifle_muzzleflash", w_shotorg, w_shotdir * 2000, 1);
 
        if(self.BUTTON_ZOOM | self.BUTTON_ZOOMSCRIPT) // if zoomed, shoot from the eye
        {
index b7f7a4f879fd39b5d23295a145fea254ab4aad57..42ca9185c80eacf9af2b6e9db12a21a01a7482e1 100644 (file)
@@ -108,7 +108,7 @@ void W_RocketPropelledChainsaw_Attack (void)
 
        W_DecreaseAmmo(WEP_CVAR(rpc, ammo));
        W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', false, 5, "weapons/rocket_fire.wav", CH_WEAPON_A, WEP_CVAR(rpc, damage));
-       pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("rocketlauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
        PROJECTILE_MAKETRIGGER(missile);
 
        missile.owner = missile.realowner = self;
index 2dce3165b848c6f316f8c7b7c315851063840d0a..dc01834ec10bf9956cbaf0686490394bb1861e07 100644 (file)
@@ -251,7 +251,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, "weapons/seeker_fire.wav", CH_WEAPON_A, 0);
        w_shotorg += f_diff;
-       pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("seeker_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        //self.detornator         = false;
 
@@ -343,7 +343,7 @@ void W_Seeker_Fire_Flac(void)
        W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, "weapons/flac_fire.wav", CH_WEAPON_A, WEP_CVAR(seeker, flac_damage));
        w_shotorg += f_diff;
 
-       pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("hagar_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        missile                                 = spawn();
        missile.owner                   = missile.realowner = self;
index 5415b4a6f0726d57b20ea393e1683efb704eedb0..ad8859e62533b429afc3e7dc737f86f0abc38cf9 100644 (file)
@@ -64,7 +64,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, 0);
 
-       pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
+       Send_Effect("shotgun_muzzleflash", w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
 
        // casing code
        if(autocvar_g_casings >= 1)
index 3c40519d6330b06d7b8cdfb4719f0884c7a69828..e7477227817da1153798fc0f0a1e1767d5e667de 100644 (file)
@@ -362,7 +362,7 @@ void W_Tuba_NoteOn(float hittype)
        o = gettaginfo(self.exteriorweaponentity, 0);
        if(time > self.tuba_smoketime)
        {
-               pointparticles(particleeffectnum("smoke_ring"), o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
+               Send_Effect("smoke_ring", o + v_up * 45 + v_right * -6 + v_forward * 8, v_up * 100, 1);
                self.tuba_smoketime = time + 0.25;
        }
 }
@@ -453,7 +453,7 @@ bool W_Tuba(int req)
                                                break;
                                }
                                W_SetupShot(self, false, 0, "", 0, 0);
-                               pointparticles(particleeffectnum("teleport"), w_shotorg, '0 0 0', 1);
+                               Send_Effect("teleport", w_shotorg, '0 0 0', 1);
                                self.weaponentity.state = WS_INUSE;
                                weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready);
                        }
index b67056f7e2257926c58cfdcc29bf7e1510da82b1..43ede987cef13a040df5bda4d023e66cb408da35 100644 (file)
@@ -75,7 +75,7 @@ void W_Vaporizer_Attack(void)
 
        self.vaporizer_lasthit = damage_goodhits;
 
-       pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       Send_Effect("nex_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
 
        // teamcolor / hit beam effect
        vector v;
@@ -84,33 +84,33 @@ void W_Vaporizer_Attack(void)
        {
                case NUM_TEAM_1:   // Red
                        if(damage_goodhits)
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED_HIT"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3RED_HIT", w_shotorg, v, 1);
                        else
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3RED"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3RED", w_shotorg, v, 1);
                        break;
                case NUM_TEAM_2:   // Blue
                        if(damage_goodhits)
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE_HIT"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3BLUE_HIT", w_shotorg, v, 1);
                        else
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3BLUE"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3BLUE", w_shotorg, v, 1);
                        break;
                case NUM_TEAM_3:   // Yellow
                        if(damage_goodhits)
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW_HIT"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3YELLOW_HIT", w_shotorg, v, 1);
                        else
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3YELLOW"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3YELLOW", w_shotorg, v, 1);
                        break;
                case NUM_TEAM_4:   // Pink
                        if(damage_goodhits)
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK_HIT"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3PINK_HIT", w_shotorg, v, 1);
                        else
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3PINK"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3PINK", w_shotorg, v, 1);
                        break;
                default:
                        if(damage_goodhits)
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3_HIT"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3_HIT", w_shotorg, v, 1);
                        else
-                               WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v);
+                               Send_Effect("TE_TEI_G3", w_shotorg, v, 1);
                        break;
        }
 
index eb5538319ab8c0ba9a2fa161bdab091c80aead79..cb19c007a7375dc29f879c2068f5fe222cc89323 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
+#include "../common/effects.qh"
 #include "../common/util.qh"
 
 #include "../common/monsters/all.qh"
@@ -281,7 +282,7 @@ float CheatImpulse(float i)
                        else
                                e = self;
 
-                       pointparticles(particleeffectnum("rocket_explode"), e.origin, '0 0 0', 1);
+                       Send_Effect("rocket_explode", e.origin, '0 0 0', 1);
                        sound(e, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
 
                        e2 = spawn();
@@ -320,13 +321,12 @@ float CheatCommand(float argc)
                                //   origin (0..1, on crosshair line)
                                //   velocity
                                //   howmany
-                               effectnum = particleeffectnum(argv(1));
                                f = stof(argv(2));
                                crosshair_trace(self);
                                start = (1-f) * self.origin + f * trace_endpos;
                                end = stov(argv(3));
                                f = stof(argv(4));
-                               pointparticles(effectnum, start, end, f);
+                               Send_Effect(argv(1), start, end, f);
                                DID_CHEAT();
                                break;
                        }
index aa02de5b0e8d6d30fe51daa46d205649b3869997..b7072849c59b9e9cd9dacf1d7cd5e9fedf2c620b 100644 (file)
@@ -186,7 +186,7 @@ void PutObserverInServer (void)
        entity  spot;
     self.hud = HUD_NORMAL;
 
-       if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+       if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
 
        spot = SelectSpawnPoint (true);
        if(!spot)
@@ -1303,7 +1303,7 @@ void ClientDisconnect (void)
 
        PlayerStats_GameReport_FinalizePlayer(self);
 
-       if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+       if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
 
        CheatShutdownClient();
 
@@ -1440,7 +1440,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;
-               pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
+               Send_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 41b74a0df4e89721ef6a51b9e38710ab86b5ec32..8b4c25c1f8ec42c0aa1b0dacb84e2d9e86fb0870 100644 (file)
@@ -529,7 +529,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, int deathtyp
                        if(deathtype == DEATH_KILL)
                        {
                                // for the lemmings fans, a small harmless explosion
-                               pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+                               Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
                        }
                }
 
index a20d35220ae08c703c8afa7f317ee0b058d9f921..cd6a7000c4f56ac586ad46031d40d8128c526602 100644 (file)
@@ -760,7 +760,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        {
                                Unfreeze(targ);
                                targ.health = autocvar_g_freezetag_revive_falldamage_health;
-                               pointparticles(particleeffectnum("iceorglass"), targ.origin, '0 0 0', 3);
+                               Send_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);
                        }
@@ -771,7 +771,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)
                {
-                       pointparticles(particleeffectnum("teleport"), targ.origin, '0 0 0', 1);
+                       Send_Effect("teleport", targ.origin, '0 0 0', 1);
 
                        entity oldself = self;
                        self = targ;
@@ -801,7 +801,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                self.oldorigin = self.origin;
                                self.prevorigin = self.origin;
 
-                               pointparticles(particleeffectnum("teleport"), self.origin, '0 0 0', 1);
+                               Send_Effect("teleport", self.origin, '0 0 0', 1);
                        }
 
                        self = oldself;
index 7a127eddab3971938567faa9479a1f64c9930222..f02e4c11b1f07ad55173652988a9cc6f92fbeaef 100644 (file)
@@ -90,7 +90,7 @@ void GrapplingHookReset(void)
 void GrapplingHookThink();
 void GrapplingHook_Stop()
 {
-       pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1);
+       Send_Effect("grapple_impact", self.origin, '0 0 0', 1);
        sound (self, CH_SHOTS, "weapons/hook_impact.wav", 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;
 
-       pointparticles(particleeffectnum("grapple_muzzleflash"), org, '0 0 0', 1);
+       Send_Effect("grapple_muzzleflash", org, '0 0 0', 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
        missile.owner = missile.realowner = self;
index de29c9a25ead17663da538b39ab8e6f25f03e024..3e3682400bd2669a167fcc211ecd737ed9a222c7 100644 (file)
@@ -23,6 +23,7 @@
 #include "../common/buffs.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
+#include "../common/effects.qh"
 #include "../common/mapinfo.qh"
 #include "../common/monsters/all.qh"
 #include "../common/monsters/sv_monsters.qh"
@@ -563,6 +564,7 @@ void spawnfunc___init_dedicated_server(void)
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        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);
@@ -611,6 +613,7 @@ void spawnfunc_worldspawn (void)
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
+       CALL_ACCUMULATED_FUNCTION(RegisterEffects);
 
        ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
 
index d17dc86a19817e172ce37c554184a9a8a608af01..121efd7e37ca91b2b1e6d5e0f29a7da3787eacd2 100644 (file)
@@ -454,7 +454,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, int capturetype)
                PlayerScore_Add(player, SP_CTF_CAPTIME, new_time - old_time);
 
        // effects
-       pointparticles(particleeffectnum(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
@@ -608,7 +608,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
        }
 
        // effects
-       pointparticles(particleeffectnum(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); }
@@ -939,7 +939,7 @@ void ctf_FlagTouch()
        {
                if(time > self.wait) // if we haven't in a while, play a sound/effect
                {
-                       pointparticles(particleeffectnum(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 ed69612d15c42e6f0e5abe4cf0e02c4ed811f30b..8cc302486f8d0ef635745c1d1b25cb5d2fb37c96 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;
 
-       pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1);
-       pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1);
+       Send_Effect("electro_combo", oldballorigin, '0 0 0', 1);
+       Send_Effect("electro_combo", self.origin, '0 0 0', 1);
 
        WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, false, RADARICON_FLAGCARRIER, '0 1 1');
        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
-               pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
+               Send_Effect("kaball_sparks", self.origin, '0 0 0', 1);
                sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM);
                return;
        }
index 9844875b3d9eb27ac56efc69049e59aed1a70f2c..e3e7b67dee894e5eb25831cefe6cb9b036ac5b8c 100644 (file)
@@ -777,7 +777,7 @@ void W_Nexball_Attack2(void)
        if(!(balls & BALL_BASKET))
                return;
        W_SetupShot(self, false, 2, "nexball/shoot2.wav", CH_WEAPON_A, 0);
-//     pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+//     Send_Effect("grenadelauncher_muzzleflash", w_shotorg, w_shotdir * 1000, 1);
        missile = spawn();
 
        missile.owner = self;
index c99643169ba598907d83c97e22a4dc58e7f6f89b..7c46e29f8ec28d0fb76116105997a6985f14dea5 100644 (file)
@@ -53,7 +53,7 @@ void ons_throwgib_think()
 
        if(d>2)
        if(random()<0.6)
-               pointparticles(particleeffectnum("onslaught_generator_gib_flame"), self.origin, '0 0 0', 1);
+               Send_Effect("onslaught_generator_gib_flame", self.origin, '0 0 0', 1);
 }
 
 void ons_throwgib(vector v_from, vector v_to, string smodel, float f_lifetime, float b_burn)
@@ -490,11 +490,11 @@ void onslaught_generator_damage_think()
        if(random() < 0.9 - self.owner.health / self.owner.max_health)
                if(random() < 0.01)
                {
-                       pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
+                       Send_Effect("electro_ballexplode", self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
                        sound(self, CH_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTEN_NORM);
                }
                else
-                       pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
+                       Send_Effect("torch_small", self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
 }
 
 void onslaught_generator_damage_spawn(entity gd_owner)
@@ -539,7 +539,7 @@ void onslaught_generator_deaththink()
        for(i=0;i < 10;++i)
        {
                org = self.origin + randompos('-30 -30 -30' * i + '0 0 -20', '30 30 30' * i + '0 0 20');
-               pointparticles(particleeffectnum("onslaught_generator_gib_explode"), org, '0 0 0', 1);
+               Send_Effect("onslaught_generator_gib_explode", org, '0 0 0', 1);
        }
 
        // Short explosion sound + small explosion
@@ -551,7 +551,7 @@ void onslaught_generator_deaththink()
 
        // Particles
        org = self.origin + randompos(self.mins + '8 8 8', self.maxs + '-8 -8 -8');
-       pointparticles(particleeffectnum("onslaught_generator_smallexplosion"), org, '0 0 0', 1);
+       Send_Effect("onslaught_generator_smallexplosion", org, '0 0 0', 1);
 
        // rays
        if(random() > 0.25 )
@@ -565,7 +565,7 @@ void onslaught_generator_deaththink()
                org = self.origin;
                te_explosion(org);
                onslaught_generator_shockwave_spawn(org);
-               pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
+               Send_Effect("onslaught_generator_finalexplosion", org, '0 0 0', 1);
                sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
        }
        else
@@ -679,7 +679,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
        else
        {
                // particles on every hit
-               pointparticles(particleeffectnum("sparks"), hitloc, force * -1, 1);
+               Send_Effect("sparks", hitloc, force * -1, 1);
 
                //sound on every hit
                if (random() < 0.5)
@@ -1026,7 +1026,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        // colormod flash when shot
        self.colormod = '2 2 2';
        // particles on every hit
-       pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
+       Send_Effect("sparks", hitloc, force*-1, 1);
        //sound on every hit
        if (random() < 0.5)
                sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTEN_NORM);
@@ -1036,7 +1036,7 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        if (self.health < 0)
        {
                sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+               Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
                {
                        string t;
                        t = Team_ColoredFullName(attacker.team);
@@ -1209,7 +1209,7 @@ void onslaught_controlpoint_icon_think()
        // damaged fx
        if(random() < 0.6 - self.health / self.max_health)
        {
-               pointparticles(particleeffectnum("electricity_sparks"), self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
+               Send_Effect("electricity_sparks", self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
 
                if(random() > 0.8)
                        sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTEN_NORM);
@@ -1264,12 +1264,9 @@ void onslaught_controlpoint_icon_buildthink()
        //setsize(self, '-32 -32 0', '32 32 8');
 
        if(random() < 0.9 - self.health / self.max_health)
-               pointparticles(particleeffectnum("rage"), self.origin + 10 * randomvec(), '0 0 -1', 1);
+               Send_Effect("rage", self.origin + 10 * randomvec(), '0 0 -1', 1);
 }
 
-
-
-
 void onslaught_controlpoint_touch()
 {
        entity e;
index b582e168604c9626b579258e19810c245144bd66..81be9a03cdccfc4096f821e8a78fc32d89679169 100644 (file)
@@ -67,7 +67,7 @@ void buff_Effect(entity player, string eff)
 
        if(time >= self.buff_effect_delay)
        {
-               pointparticles(particleeffectnum(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
        }
 }
@@ -131,8 +131,8 @@ void buff_Respawn(entity ent)
        if(autocvar_g_buffs_random_lifetime > 0)
                ent.lifetime = time + autocvar_g_buffs_random_lifetime;
 
-       pointparticles(particleeffectnum("electro_combo"), oldbufforigin + ((ent.mins + ent.maxs) * 0.5), '0 0 0', 1);
-       pointparticles(particleeffectnum("electro_combo"), CENTER_OR_VIEWOFS(ent), '0 0 0', 1);
+       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);
 
        WaypointSprite_Ping(ent.buff_waypoint);
 
@@ -181,7 +181,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);
 
-       pointparticles(particleeffectnum("item_pickup"), CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+       Send_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);
 }
@@ -263,7 +263,7 @@ void buff_Think()
                {
                        self.buff_active = true;
                        sound(self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);
-                       pointparticles(particleeffectnum("item_respawn"), CENTER_OR_VIEWOFS(self), '0 0 0', 1);
+                       Send_Effect("item_respawn", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
                }
        }
 
@@ -650,8 +650,8 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThrowKey)
                        closest.pushltime = time + autocvar_g_maxpushtime;
                        closest.istypefrag = closest.BUTTON_CHAT;
 
-                       pointparticles(particleeffectnum("electro_combo"), their_org, '0 0 0', 1);
-                       pointparticles(particleeffectnum("electro_combo"), my_org, '0 0 0', 1);
+                       Send_Effect("electro_combo", their_org, '0 0 0', 1);
+                       Send_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);
@@ -739,7 +739,7 @@ MUTATOR_HOOKFUNCTION(buffs_PlayerThink)
        if(time < self.buff_disability_time)
        if(time >= self.buff_disability_effect_time)
        {
-               pointparticles(particleeffectnum("smoking"), self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1);
+               Send_Effect("smoking", self.origin + ((self.mins + self.maxs) * 0.5), '0 0 0', 1);
                self.buff_disability_effect_time = time + 0.5;
        }
 
index 40f4f7247db6fb284d272732724c71e0aff6e0d5..82cb70fc5970b2acfe2f95b2ceda6202b7b47c8e 100644 (file)
@@ -78,7 +78,7 @@ void napalm_damage(float dist, float damage, float edgedamage, float burntime)
                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);
-               pointparticles(particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+               Send_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;
-       pointparticles(particleeffectnum("electro_impact"), frost_target.origin, '0 0 0', 1);
+       Send_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); }
@@ -259,7 +259,7 @@ void nade_ice_think()
                                case NUM_TEAM_4: expef = "nade_pink_explode"; break;
                                default:                 expef = "nade_neutral_explode"; break;
                        }
-                       pointparticles(particleeffectnum(expef), self.origin + '0 0 1', '0 0 0', 1);
+                       Send_Effect(expef, self.origin + '0 0 1', '0 0 0', 1);
                        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
 
                        RadiusDamage(self, self.realowner, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage,
@@ -284,15 +284,15 @@ void nade_ice_think()
        randomp.x = randomr*cos(randomw);
        randomp.y = randomr*sin(randomw);
        randomp.z = 1;
-       pointparticles(particleeffectnum("electro_muzzleflash"), self.origin + randomp, '0 0 0', 1);
+       Send_Effect("electro_muzzleflash", self.origin + randomp, '0 0 0', 1);
 
        if(time >= self.nade_special_time)
        {
                self.nade_special_time = time+0.7;
 
 
-               pointparticles(particleeffectnum("electro_impact"), self.origin, '0 0 0', 1);
-               pointparticles(particleeffectnum("icefield"), self.origin, '0 0 0', 1);
+               Send_Effect("electro_impact", self.origin, '0 0 0', 1);
+               Send_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 )
-                                       pointparticles(particleeffectnum("healing_fx"), other.origin, '0 0 0', 1);
+                                       Send_Effect("healing_fx", 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);
@@ -530,7 +530,7 @@ void nade_boom()
        }
 
        if(expef != "")
-               pointparticles(particleeffectnum(expef), findbetterlocation(self.origin, 8), '0 0 0', 1);
+               Send_Effect(expef, findbetterlocation(self.origin, 8), '0 0 0', 1);
 
        sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
@@ -1120,7 +1120,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDamage)
        {
                Unfreeze(frag_target);
                frag_target.health = autocvar_g_freezetag_revive_nade_health;
-               pointparticles(particleeffectnum("iceorglass"), frag_target.origin, '0 0 0', 3);
+               Send_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 a45c64f5c5b03fa42513b3f342ed3cd056510e76..5d3dda20d687e999bbef5cae3214d8976dbdf40c 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, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("explosion_small"), org, '0 0 0', 1);
+       Send_Effect("explosion_small", org, '0 0 0', 1);
 
        entity e;
        e = spawn();
index 3593c57b9e35be773c712378458bef3044bf3cf7..2d9ab47c00ab9580161ced097bc3ff08bcf5684e 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);
-       pointparticles(particleeffectnum(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 438ff00d3453e443e4d7e7d0f63970a5e0dcdf45..7acbc659f06fa057ca62abd8706bdcf4fee6b7a1 100644 (file)
@@ -411,7 +411,7 @@ void Portal_Remove(entity portal, float killed)
        {
                fixedmakevectors(portal.mangle);
                sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("rocket_explode"), portal.origin + v_forward * 16, v_forward * 1024, 4);
+               Send_Effect("rocket_explode", portal.origin + v_forward * 16, v_forward * 1024, 4);
                remove(portal);
        }
        else
index 388d1b675486fd8e0d1e21fb5db53343a0534682..51b7b41e963d5eae2e10835997325f7a009d19f0 100644 (file)
@@ -87,6 +87,7 @@ weapons/weaponsystem.qc
 ../common/buffs.qc
 ../common/campaign_file.qc
 ../common/campaign_setup.qc
+../common/effects.qc
 ../common/mapinfo.qc
 ../common/monsters/all.qc
 ../common/monsters/spawn.qc
index f102017b5fc79ce58ae10a4117db276acfe33bc5..01af275528d2d2a0b1881ae378cc95e38c1a8677 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()
 {
-       pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+       Send_Effect("rocket_explode", self.origin, '0 0 0', 1);
 
     self.owner.cnt += 1;
     self.owner = world;
index dd2d9b5f8e19ec6ab5fb7625657c099c96a46202..aa0e830651c61678dee1493a185e07480b0e743e 100644 (file)
@@ -608,8 +608,8 @@ void Item_Respawn (void)
        self.think = Item_Think;
        self.nextthink = time;
 
-       //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
-       pointparticles(particleeffectnum("item_respawn"), self.origin + 0.5 * (self.mins + self.maxs), '0 0 0', 1);
+       //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);
 }
 
 void Item_RespawnCountdown (void)
@@ -931,7 +931,7 @@ void Item_Touch (void)
 
        other.last_pickup = time;
 
-       pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);
+       Send_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")
@@ -1010,6 +1010,7 @@ void Item_FindTeam()
 // TODO: perhaps nice special effect?
 void RemoveItem(void)
 {
+       Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
        remove(self);
 }
 
index 4133ae97df5043fd277ede7d07fe17c5472a9e1f..4efdf6716b1a857307bedb7b4c77ef1bc2a671ab 100644 (file)
@@ -18,7 +18,7 @@ void ewheel_attack()
         _mis = turret_projectile("weapons/lasergun_fire.wav", 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_BLASTER, true, true); // WEAPONTODO: this is not a projectile made by the blaster, add separate effect for it
         _mis.missile_flags = MIF_SPLASH;
 
-        pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+        Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
         self.tur_head.frame += 2;
 
index e398a83da58f133b63ec62f7f3f049493694a6db..be277c5551d15f7f53e2a840365867e1ce4afd43 100644 (file)
@@ -26,7 +26,7 @@ void turret_flac_attack()
     turret_tag_fire_update();
 
     proj = turret_projectile("weapons/hagar_fire.wav", 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, true, true);
-    pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+    Send_Effect("laser_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 1bfd8ac34d3ab278111b065c2e1cd702ab7552f0..357826aff4e2d9f79cc594b01a1181ba80aaaa17 100644 (file)
@@ -34,7 +34,7 @@ void turret_plasma_minsta_attack (void)
                                           800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
 
-       pointparticles(particleeffectnum("nex_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+       Send_Effect("nex_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
        // teamcolor / hit beam effect
        vector v;
@@ -68,7 +68,7 @@ void turret_plasma_attack()
     entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, true, true);
     missile.missile_flags = MIF_SPLASH;
 
-    pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+    Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     if (self.tur_head.frame == 0)
         self.tur_head.frame = 1;
 }
@@ -77,7 +77,7 @@ void turret_plasma_dual_attack()
 {
     entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, true, true);
     missile.missile_flags = MIF_SPLASH;
-    pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+    Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     self.tur_head.frame += 1;
 }
 
index f70f7ab26724a6eaa794d9fd917fa718f8b27901..16e8c5cad02894523bd650b65fd45d4ff9311aa7 100644 (file)
@@ -522,7 +522,7 @@ void walker_attack()
 {
     sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", 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);
-    pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
+    Send_Effect("laser_muzzleflash", self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 }
 
 
index 5f124ff3ba390834249f1ffba83f65e36392079d..ba9378a269961072ac9b9cd3aa3588bee783b049 100644 (file)
@@ -622,7 +622,7 @@ void bumb_blowup()
                                 DEATH_VH_BUMB_DEATH, world);
 
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+       Send_Effect("explosion_large", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
 
        if(self.owner.deadflag == DEAD_DYING)
                self.owner.deadflag = DEAD_DEAD;
@@ -638,7 +638,7 @@ void bumb_diethink()
        if(random() < 0.1)
        {
                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        }
 
        self.nextthink = time + 0.1;
@@ -686,7 +686,7 @@ void bumb_die()
        _body.owner = self;
        _body.enemy = self.enemy;
 
-       pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
+       Send_Effect("explosion_medium", findbetterlocation(self.origin, 16), '0 0 0', 1);
 
        self.health                     = 0;
        self.event_damage       = func_null;
index a6d425393aced1afb3d10595cf50bee408f25cb9..d5d0437b47d78a143e68dadf216e8cdfa50eac35 100644 (file)
@@ -337,7 +337,7 @@ float racer_frame()
     if (player.BUTTON_JUMP && racer.vehicle_energy >= (autocvar_g_vehicle_racer_afterburn_cost * frametime))
     {
         if(time - racer.wait > 0.2)
-            pointparticles(particleeffectnum("wakizashi_booster_smoke"), self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
+            Send_Effect("wakizashi_booster_smoke", self.origin - v_forward * 32, v_forward  * vlen(self.velocity), 1);
 
         racer.wait = time;
         racer.vehicle_energy -= autocvar_g_vehicle_racer_afterburn_cost * frametime;
@@ -347,7 +347,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);
+                Send_Effect("smoke_small", trace_endpos, '0 0 0', 1);
 
             racer.invincible_finished = time + 0.1 + (random() * 0.1);
         }
@@ -586,7 +586,7 @@ void racer_die()
     self.cnt          = 1 + random() * 2;
     self.touch        = racer_deadtouch;
 
-    pointparticles(particleeffectnum("explosion_medium"), self.origin, '0 0 0', 1);
+    Send_Effect("explosion_medium", self.origin, '0 0 0', 1);
 
     if(random() < 0.5)
         self.avelocity_z = 32;
index 46ffea1f8d111afeec5ac1482264910907221880..d0b52a2108c92fd68a1b3d29ad93c7e36259a080 100644 (file)
@@ -717,7 +717,7 @@ void raptor_diethink()
     if(random() < 0.1)
     {
         sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-        pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+        Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
     }
     self.nextthink = time + 0.1;
 }
@@ -734,7 +734,7 @@ void raptor_die()
     self.nextthink    = time;
     self.wait            = time + 5 + (random() * 5);
 
-    pointparticles(particleeffectnum("explosion_medium"), findbetterlocation (self.origin, 16), '0 0 0', 1);
+    Send_Effect("explosion_medium", findbetterlocation (self.origin, 16), '0 0 0', 1);
 
     self.velocity_z += 600;
 
index aa4c927be41c29ed356f4d9b4b5c219ef5e4d934..ce40a2505c3dfc7b6d0540a1c61bc7f7eec8d7cb 100644 (file)
@@ -507,7 +507,7 @@ float spiderbot_frame()
 
             sound (gun, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTEN_NORM);
             //trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
-            pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
+            Send_Effect("spiderbot_minigun_muzzleflash", v, v_forward * 2500, 1);
 
             self = spider;
 
@@ -654,7 +654,7 @@ void spiderbot_headfade()
         if(self.alpha > 0.1)
         {
             sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-            pointparticles(particleeffectnum("explosion_big"), self.origin + '0 0 100', '0 0 0', 1);
+            Send_Effect("explosion_big", self.origin + '0 0 100', '0 0 0', 1);
         }
         remove(self);
     }
@@ -667,7 +667,7 @@ void spiderbot_blowup()
         if(random() < 0.1)
         {
             sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-            pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+            Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
         }
         self.nextthink = time + 0.1;
         return;
index 50f355d73ddb34f167d2f53c9c606ae5f4c17d8a..5ce1e43a9f16dc123c8aad11ea869a91b0a3423a 100644 (file)
@@ -164,7 +164,7 @@ void targetdrone_damage(entity inflictor, entity attacker, float damage, int dea
        self.health -= damage;
        if(self.health <= 0)
        {
-               pointparticles(particleeffectnum("explosion_medium"), self.origin, '0 0 0', 1);
+               Send_Effect("explosion_medium", self.origin, '0 0 0', 1);
 
                if(!self.cnt)
                        remove(self);
@@ -434,7 +434,7 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
         sound (self, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTEN_NORM);
 
     if(_mzlfx)
-        pointparticles(particleeffectnum(_mzlfx), proj.origin, proj.velocity, 1);
+        Send_Effect(_mzlfx, proj.origin, proj.velocity, 1);
 
 
     setsize (proj, '-1 -1 -1' * _size, '1 1 1' * _size);
@@ -505,7 +505,7 @@ void vehicles_spawn()
     self.angles             = self.pos2;
     setorigin(self, self.pos1 + '0 0 0');
     // Show it
-    pointparticles(particleeffectnum("teleport"), self.origin + '0 0 64', '0 0 0', 1);
+    Send_Effect("teleport", self.origin + '0 0 64', '0 0 0', 1);
 
     if(self.vehicle_controller)
         self.team = self.vehicle_controller.team;
@@ -877,7 +877,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);
+        Send_Effect("smoke_small", (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
         if(self.vehicle_flags & VHF_DMGSHAKE)
             self.velocity += randomvec() * 30;
@@ -1003,7 +1003,7 @@ void vehicles_clearreturn()
 
 void vehicles_return()
 {
-    pointparticles(particleeffectnum("teleport"), self.wp00.origin + '0 0 64', '0 0 0', 1);
+    Send_Effect("teleport", self.wp00.origin + '0 0 64', '0 0 0', 1);
 
     self.wp00.think     = vehicles_spawn;
     self.wp00.nextthink = time;
@@ -1359,7 +1359,7 @@ vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string
 void vehicles_gib_explode()
 {
        sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+       Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        remove(self);
 }