]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/effects/all.qh
Merge branch 'TimePath/cleanup'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / all.qh
1 #ifndef EFFECTS_ALL_H
2 #define EFFECTS_ALL_H
3
4 #include "effect.qh"
5
6 #ifdef CSQC
7 void Read_Effect(bool is_new);
8 #elif defined(SVQC)
9 void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt);
10 void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt);
11 #endif
12
13 REGISTRY(Effects, BIT(8))
14 REGISTER_REGISTRY(RegisterEffects)
15 #define EFFECT(istrail, name, realname) \
16     REGISTER(RegisterEffects, EFFECT, Effects, name, m_id, Create_Effect_Entity(realname, istrail));
17
18 void RegisterEffects_First()
19 {
20     #ifdef SVQC
21     #define dedi (server_is_dedicated ? "a dedicated " : "")
22     #else
23     #define dedi ""
24     #endif
25
26     LOG_TRACEF("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME);
27     #undef dedi
28 }
29
30 void RegisterEffects_Done()
31 {
32     LOG_TRACE("Effects initialization successful!\n");
33 }
34
35 // NOW we actually activate the declarations
36 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_First)
37 EFFECT(0, Null, string_null)
38 #include "all.inc"
39 ACCUMULATE_FUNCTION(RegisterEffects, RegisterEffects_Done)
40
41 #endif