]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/ent_cs.qh
Merge branch 'master' into TimePath/csqc_sounds
[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_customize();
26
27 bool entcs_send(entity this, entity to, int sf);
28
29 void entcs_think();
30
31 void entcs_attach(entity e);
32
33 void entcs_detach(entity e);
34
35 .int m_forceupdate;
36
37 /** Force an origin update, for player sounds */
38 #define entcs_force_origin(e) ((e).entcs.m_forceupdate = BIT(2))
39
40 #endif
41
42 #ifdef CSQC
43
44 entity entcs_receiver[255]; // 255 is the engine limit on maxclients
45 #define entcs_is_self(e) ((e).sv_entnum + 1 == player_localentnum)
46
47 #endif
48
49 #endif