Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.qh File Reference
#include "effect.qh"
#include "all.inc"
Include dependency graph for all.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EFFECT(istrail, name, realname)

Functions

void Send_Effect (entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
void Send_Effect_ (string eff_name, vector eff_loc, vector eff_vel, int eff_cnt)
void Send_Effect_Except (entity eff, vector eff_loc, vector eff_vel, int eff_cnt, vector eff_col_min, vector eff_col_max, entity ignore)

Macro Definition Documentation

◆ EFFECT

#define EFFECT ( istrail,
name,
realname )
Value:
REGISTER(Effects, EFFECT, name, m_id, Create_Effect_Entity(realname, istrail));
entity Create_Effect_Entity(string eff_name, bool eff_trail)
Definition effect.qh:29
int m_id
Definition effect.qh:19
#define EFFECT(istrail, name, realname)
Definition all.qh:14
string name
Definition menu.qh:30
#define REGISTER(...)
Register a new entity with a registry.
Definition registry.qh:87

Definition at line 14 of file all.qh.

14#define EFFECT(istrail, name, realname) \
15 REGISTER(Effects, EFFECT, name, m_id, Create_Effect_Entity(realname, istrail));

Function Documentation

◆ Send_Effect()

void Send_Effect ( entity eff,
vector eff_loc,
vector eff_vel,
int eff_cnt )

Definition at line 124 of file all.qc.

125{
126 Send_Effect_Except(eff, eff_loc, eff_vel, eff_cnt, '0 0 0', '0 0 0', NULL);
127}
void Send_Effect_Except(entity eff, vector eff_loc, vector eff_vel, int eff_cnt, vector eff_col_min, vector eff_col_max, entity ignore)
Definition all.qc:105
#define NULL
Definition post.qh:14

References entity(), NULL, Send_Effect_Except(), and vector.

Referenced by Arc_Smoke(), buff_Respawn(), buff_Think(), buff_Touch(), bumblebee_blowup(), bumblebee_diethink(), CheatImpulse(), ClientDisconnect(), GrapplingHook_Stop(), jumppad_push(), ka_RespawnBall(), ka_TouchEvent(), kh_WinnerTeam(), M_Golem_Attack_Lightning_Explode(), M_Golem_Attack_Smash(), M_Mage_Attack_Push(), M_Mage_Attack_Spike_Explode(), M_Mage_Attack_Teleport(), M_Mage_Defend_Heal(), M_Spider_Attack_Web_Explode(), M_Wyvern_Attack_Fireball_Explode(), Monster_Remove(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_ammo_touch(), nade_darkness_think(), nade_heal_touch(), nade_ice_freeze(), nade_ice_think(), napalm_damage(), ons_ControlPoint_Icon_BuildThink(), ons_ControlPoint_Icon_Spawn(), ons_ControlPoint_Icon_Think(), ons_GeneratorDamage(), ons_Teleport(), PlayerDamage(), PlayerTouchExplode(), Portal_Remove(), PutObserverInServer(), raptor_diethink(), respawn(), spiderbot_blowup(), spiderbot_frame(), spiderbot_headfade(), TeleportPlayer(), tka_RespawnBall(), tka_TouchEvent(), turret_die(), vehicles_gib_explode(), vehicles_painframe(), vehicles_projectile(), vehicles_return(), vehicles_spawn(), W_Arc_Beam_Think(), W_Arc_Bolt_Touch(), W_Crylink_LinkJoinEffect_Think(), W_Devastator_Think(), W_Fireball_AttackEffect(), W_Fireball_Explode(), W_Fireball_LaserPlay(), W_Hagar_Touch2(), W_Mortar_Grenade_Touch1(), W_Mortar_Grenade_Touch2(), W_Shotgun_Melee_Think(), and W_Tuba_NoteOn().

◆ Send_Effect_()

void Send_Effect_ ( string eff_name,
vector eff_loc,
vector eff_vel,
int eff_cnt )

Definition at line 129 of file all.qc.

130{
131 // problem with this is, we might not have all the available effects for it
132 FOREACH(Effects, it.eent_eff_name == eff_name, {
133 Send_Effect(it, eff_loc, eff_vel, eff_cnt);
134 return;
135 });
136 // revert to engine handling TODO: send the effect name and draw it on the client side? not as light on networking, but resolves the use of server side effects
137 __pointparticles(_particleeffectnum(eff_name), eff_loc, eff_vel, eff_cnt);
138}
#define FOREACH(list, cond, body)
Definition iter.qh:19

References FOREACH, and vector.

Referenced by buff_Effect(), CheatCommand(), ctf_Handle_Capture(), ctf_Handle_Pickup(), and sandbox_ObjectFunction_Touch().

◆ Send_Effect_Except()

void Send_Effect_Except ( entity eff,
vector eff_loc,
vector eff_vel,
int eff_cnt,
vector eff_col_min,
vector eff_col_max,
entity ignore )

Definition at line 105 of file all.qc.

106{
107 if(!eff) { return; }
108 if(!eff.eent_eff_trail && !eff_cnt) { return; } // effect has no count!
109 entity net_eff = new_pure(net_effect);
110 net_eff.owner = eff;
111 //net_eff.eent_broadcast = broadcast;
112 net_eff.m_id = eff.m_id;
113 net_eff.eent_net_velocity = eff_vel;
114 net_eff.eent_net_location = eff_loc;
115 net_eff.eent_net_count = eff_cnt;
116 net_eff.eent_eff_trail = eff.eent_eff_trail;
117 net_eff.eent_net_color_min = eff_col_min;
118 net_eff.eent_net_color_max = eff_col_max;
119
120 FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != ignore && !(IS_SPEC(it) && it.enemy && it.enemy == ignore), Net_Write_Effect(net_eff, it, 0));
121 delete(net_eff);
122}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
bool Net_Write_Effect(entity this, entity client, int sf)
Definition all.qc:58
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#define IS_SPEC(v)
Definition utils.qh:10
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:50

References entity(), FOREACH_CLIENT, IS_REAL_CLIENT, IS_SPEC, Net_Write_Effect(), new_pure, and vector.

Referenced by nade_boom(), nade_darkness_think(), nade_ice_think(), Send_Effect(), and W_MuzzleFlash().