From: Mario Date: Fri, 21 Aug 2015 05:31:38 +0000 (+1000) Subject: Send effects to client, allows mismatching effectinfo.txt X-Git-Tag: xonotic-v0.8.2~2065^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6143f483810ae1e181fc53b77cca98e6603be2d1;p=xonotic%2Fxonotic-data.pk3dir.git Send effects to client, allows mismatching effectinfo.txt --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index b56887878..872b7f9ba 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -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)); diff --git a/qcsrc/client/progs.src b/qcsrc/client/progs.src index d161c6dfc..db8817818 100644 --- a/qcsrc/client/progs.src +++ b/qcsrc/client/progs.src @@ -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 diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 61c08bf86..901c4bb0f 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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 index 000000000..8fe7a97d7 --- /dev/null +++ b/qcsrc/common/effects.qc @@ -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 index 000000000..2b645813c --- /dev/null +++ b/qcsrc/common/effects.qh @@ -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 diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index ec1e4be31..bbf9ddb1c 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -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; diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index 986a0e10f..df796b518 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -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; diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index c6d4bc7d5..65ba8dad5 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -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) diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 75e267016..849abc36c 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -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); diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index ab7cd135a..8658b437f 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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); diff --git a/qcsrc/common/triggers/func/breakable.qc b/qcsrc/common/triggers/func/breakable.qc index e36cdb01b..15d7035ce 100644 --- a/qcsrc/common/triggers/func/breakable.qc +++ b/qcsrc/common/triggers/func/breakable.qc @@ -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) { diff --git a/qcsrc/common/triggers/teleporters.qc b/qcsrc/common/triggers/teleporters.qc index a5d89f50b..3a4022641 100644 --- a/qcsrc/common/triggers/teleporters.qc +++ b/qcsrc/common/triggers/teleporters.qc @@ -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; } diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 6c6675e11..b14078fb4 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -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; } diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index 79d4dc7c7..f7b8ac0dc 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -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 || diff --git a/qcsrc/common/weapons/w_blaster.qc b/qcsrc/common/weapons/w_blaster.qc index 1e41f9df8..31a5151fa 100644 --- a/qcsrc/common/weapons/w_blaster.qc +++ b/qcsrc/common/weapons/w_blaster.qc @@ -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; diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index 0825103d4..e9163ad59 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -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) { diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index 0dd8f80f7..2dde60b98 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -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; diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index 0a219392e..6fb0c26df 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -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"; diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index 112b6524e..1cec08e96 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -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; diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index 808d7733a..5c5f418f9 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -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; diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index e9c7ffee4..ab5566992 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -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; diff --git a/qcsrc/common/weapons/w_hmg.qc b/qcsrc/common/weapons/w_hmg.qc index de9c983b2..3aa052531 100644 --- a/qcsrc/common/weapons/w_hmg.qc +++ b/qcsrc/common/weapons/w_hmg.qc @@ -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'); diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 24a0db83f..56a89fd9d 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -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'); diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index 32d999612..45fdb0573 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -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; diff --git a/qcsrc/common/weapons/w_mortar.qc b/qcsrc/common/weapons/w_mortar.qc index a8c6a2c59..a2ac41c49 100644 --- a/qcsrc/common/weapons/w_mortar.qc +++ b/qcsrc/common/weapons/w_mortar.qc @@ -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; diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index 40964891d..909e5db4a 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -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; diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index 16d6ad6f8..50ccc4e96 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -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 { diff --git a/qcsrc/common/weapons/w_rpc.qc b/qcsrc/common/weapons/w_rpc.qc index b7f7a4f87..42ca9185c 100644 --- a/qcsrc/common/weapons/w_rpc.qc +++ b/qcsrc/common/weapons/w_rpc.qc @@ -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; diff --git a/qcsrc/common/weapons/w_seeker.qc b/qcsrc/common/weapons/w_seeker.qc index 2dce3165b..dc01834ec 100644 --- a/qcsrc/common/weapons/w_seeker.qc +++ b/qcsrc/common/weapons/w_seeker.qc @@ -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; diff --git a/qcsrc/common/weapons/w_shotgun.qc b/qcsrc/common/weapons/w_shotgun.qc index 5415b4a6f..ad8859e62 100644 --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@ -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) diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index 3c40519d6..e74772278 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -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); } diff --git a/qcsrc/common/weapons/w_vaporizer.qc b/qcsrc/common/weapons/w_vaporizer.qc index b67056f7e..43ede987c 100644 --- a/qcsrc/common/weapons/w_vaporizer.qc +++ b/qcsrc/common/weapons/w_vaporizer.qc @@ -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; } diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index eb5538319..cb19c007a 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -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; } diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index aa02de5b0..b7072849c 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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); } diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 41b74a0df..8b4c25c1f 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -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); } } diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index a20d35220..cd6a7000c 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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; diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 7a127edda..f02e4c11b 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -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; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index de29c9a25..3e3682400 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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)); diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index d17dc86a1..121efd7e3 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -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; } diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/gamemode_keepaway.qc index ed69612d1..8cc302486 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/gamemode_keepaway.qc @@ -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; } diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 9844875b3..e3e7b67de 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -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; diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index c99643169..7c46e29f8 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -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; diff --git a/qcsrc/server/mutators/mutator_buffs.qc b/qcsrc/server/mutators/mutator_buffs.qc index b582e1686..81be9a03c 100644 --- a/qcsrc/server/mutators/mutator_buffs.qc +++ b/qcsrc/server/mutators/mutator_buffs.qc @@ -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; } diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index 40f4f7247..82cb70fc5 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -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); diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index a45c64f5c..5d3dda20d 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -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(); diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 3593c57b9..2d9ab47c0 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -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() diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 438ff00d3..7acbc659f 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -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 diff --git a/qcsrc/server/progs.src b/qcsrc/server/progs.src index 388d1b675..51b7b41e9 100644 --- a/qcsrc/server/progs.src +++ b/qcsrc/server/progs.src @@ -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 diff --git a/qcsrc/server/steerlib.qc b/qcsrc/server/steerlib.qc index f102017b5..01af27552 100644 --- a/qcsrc/server/steerlib.qc +++ b/qcsrc/server/steerlib.qc @@ -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; diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index dd2d9b5f8..aa0e83065 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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); } diff --git a/qcsrc/server/tturrets/units/unit_ewheel.qc b/qcsrc/server/tturrets/units/unit_ewheel.qc index 4133ae97d..4efdf6716 100644 --- a/qcsrc/server/tturrets/units/unit_ewheel.qc +++ b/qcsrc/server/tturrets/units/unit_ewheel.qc @@ -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; diff --git a/qcsrc/server/tturrets/units/unit_flac.qc b/qcsrc/server/tturrets/units/unit_flac.qc index e398a83da..be277c555 100644 --- a/qcsrc/server/tturrets/units/unit_flac.qc +++ b/qcsrc/server/tturrets/units/unit_flac.qc @@ -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; diff --git a/qcsrc/server/tturrets/units/unit_plasma.qc b/qcsrc/server/tturrets/units/unit_plasma.qc index 1bfd8ac34..357826aff 100644 --- a/qcsrc/server/tturrets/units/unit_plasma.qc +++ b/qcsrc/server/tturrets/units/unit_plasma.qc @@ -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; } diff --git a/qcsrc/server/tturrets/units/unit_walker.qc b/qcsrc/server/tturrets/units/unit_walker.qc index f70f7ab26..16e8c5cad 100644 --- a/qcsrc/server/tturrets/units/unit_walker.qc +++ b/qcsrc/server/tturrets/units/unit_walker.qc @@ -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); } diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index 5f124ff3b..ba9378a26 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -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; diff --git a/qcsrc/server/vehicles/racer.qc b/qcsrc/server/vehicles/racer.qc index a6d425393..d5d0437b4 100644 --- a/qcsrc/server/vehicles/racer.qc +++ b/qcsrc/server/vehicles/racer.qc @@ -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; diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index 46ffea1f8..d0b52a210 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -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; diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index aa4c927be..ce40a2505 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -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; diff --git a/qcsrc/server/vehicles/vehicle.qc b/qcsrc/server/vehicles/vehicle.qc index 50f355d73..5ce1e43a9 100644 --- a/qcsrc/server/vehicles/vehicle.qc +++ b/qcsrc/server/vehicles/vehicle.qc @@ -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); }