Merge branch 'master' into Mario/csqc_muzzleflash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / effect.qh
1 #pragma once
2
3 #define particleeffectnum(e) \
4         _particleeffectnum(e.eent_eff_name)
5
6 #if defined(SVQC)
7         #define pointparticles(effect, org, vel, howmany) \
8                 Send_Effect(effect, org, vel, howmany)
9         #define trailparticles(e, effect, org, vel) \
10                 ((!e) ? Send_Effect(effect, org, vel, 0) \
11                 : __trailparticles(e, particleeffectnum(effect), org, vel))
12 #elif defined(CSQC)
13         #define pointparticles(effect, org, vel, howmany) \
14                 __pointparticles(particleeffectnum(effect), org, vel, howmany)
15         #define trailparticles(e, effect, org, vel) \
16                 __trailparticles(e, particleeffectnum(effect), org, vel)
17 #endif
18
19 .int m_id;
20 .string eent_eff_name;
21 .int eent_eff_trail;
22
23 .vector eent_net_location;
24 .vector eent_net_velocity;
25 .int eent_net_count;
26
27 entity Create_Effect_Entity(string eff_name, bool eff_trail)
28 {
29         entity this = new_pure(effect_entity);
30         this.eent_eff_name = eff_name;
31         this.eent_eff_trail = eff_trail;
32         return this;
33 }