#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"
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
+ CALL_ACCUMULATED_FUNCTION(RegisterEffects);
WaypointSprite_Load();
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));
../common/animdecide.qc
../common/buffs.qc
+../common/effects.qc
../common/mapinfo.qc
../common/movetypes/include.qc
../common/nades.qc
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;
--- /dev/null
+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
--- /dev/null
+#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
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);
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);
{
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);
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;
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);
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;
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)
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);
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);
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)
{
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;
}
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;
}
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);
}
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;
{
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 ||
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;
e.projectiledeathtype,
other
);
- pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+ Send_Effect("crylink_joinexplode", self.origin, '0 0 0', n);
}
}
}
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)
{
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)
{
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;
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;
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";
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";
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);
}
}
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);
}
}
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";
{
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)
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;
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;
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;
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;
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;
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;
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;
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');
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');
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');
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');
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;
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;
}
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;
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;
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;
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;
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
{
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;
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;
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;
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)
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;
}
}
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);
}
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;
{
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;
}
#include "../common/constants.qh"
#include "../common/deathtypes.qh"
+#include "../common/effects.qh"
#include "../common/util.qh"
#include "../common/monsters/all.qh"
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();
// 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;
}
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)
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();
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);
}
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);
}
}
{
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);
}
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;
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;
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;
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;
#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"
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);
CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
+ CALL_ACCUMULATED_FUNCTION(RegisterEffects);
ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
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
}
// 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); }
{
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;
}
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);
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;
}
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;
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)
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)
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
// 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 )
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
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)
// 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);
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);
// 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);
//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;
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
}
}
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);
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);
}
{
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);
}
}
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);
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;
}
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);
}
}
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); }
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,
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);
}
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);
}
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);
{
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);
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();
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()
{
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
../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
#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;
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)
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")
// TODO: perhaps nice special effect?
void RemoveItem(void)
{
+ Send_Effect("item_pickup", CENTER_OR_VIEWOFS(self), '0 0 0', 1);
remove(self);
}
_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;
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;
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;
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;
}
{
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;
}
{
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);
}
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;
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;
_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;
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;
{
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);
}
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;
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;
}
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;
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;
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);
}
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;
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);
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);
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;
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;
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;
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);
}