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