]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/ent_cs.qh
Merge branch 'terencehill/hud_cvars' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / ent_cs.qh
1 #ifndef ENT_CS_H
2 #define ENT_CS_H
3
4 REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
5
6 /** True when private information such as origin is available */
7 .bool m_entcs_private;
8
9 /** True when a recent origin is available */
10 .bool has_origin;
11
12 #ifdef SVQC
13 /**
14  * The point of these entities is to avoid the problems
15  * with clientprediction.
16  * If you add SendEntity to players, the engine will not
17  * do any prediction anymore, and you'd have to write the whole
18  * prediction code in CSQC, you want that? :P
19  * Data can depend on gamemode. For now, it serves as GPS entities
20  * in onslaught... YAY ;)
21  */
22
23 .entity entcs;
24
25 bool entcs_send(entity this, entity to, int sf);
26
27 void entcs_think();
28
29 void entcs_attach(entity e);
30
31 void entcs_detach(entity e);
32
33 .int m_forceupdate;
34
35 /** Force an origin update, for player sounds */
36 #define entcs_force_origin(e) ((e).entcs.m_forceupdate = BIT(2))
37
38 #endif
39
40 #ifdef CSQC
41
42 entity entcs_receiver[255]; // 255 is the engine limit on maxclients
43 #define entcs_is_self(e) ((e).sv_entnum + 1 == player_localentnum)
44
45 #endif
46
47 #endif