]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/subs.qh
#includes: cleanup client
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / subs.qh
1 #ifndef SUBS_H
2 #define SUBS_H
3
4 #ifdef SVQC
5
6         #define SUB_ANGLES(s)           (s).angles
7         #define SUB_VELOCITY            velocity
8         #define SUB_AVELOCITY           avelocity
9         #define SUB_ORIGIN                      origin
10         #define SUB_SETORIGIN(s,v)      setorigin((s), (v))
11         #define SUB_NEXTTHINK           nextthink
12         #define SUB_THINK                       think
13         #define SUB_LTIME                       ltime
14         #define SUB_FLAGS                       flags
15
16 #elif defined(CSQC)
17
18         void _Movetype_LinkEdict(float touch_triggers);
19
20         #define SUB_ANGLES(s)   (s).move_angles
21         #define SUB_VELOCITY    move_velocity
22         #define SUB_AVELOCITY   move_avelocity
23         #define SUB_ORIGIN              move_origin
24         #define SUB_NEXTTHINK   move_nextthink
25         #define SUB_THINK               move_think
26         #define SUB_LTIME               move_ltime
27         #define SUB_FLAGS               move_flags
28
29 .vector move_origin;
30
31         void SUB_SETORIGIN(entity s, vector v)
32         {SELFPARAM();
33                 s.move_origin = v;
34                 WITH(entity, self, s, _Movetype_LinkEdict(true));
35         }
36
37 #endif
38
39 void SUB_Remove();
40 void SUB_SetFade (entity ent, float when, float fading_time);
41 void SUB_VanishOrRemove (entity ent);
42
43 .vector         finaldest, finalangle;          //plat.qc stuff
44 .void()         think1;
45 .float state;
46 .float          t_length, t_width;
47
48 .vector destvec;
49 .vector destvec2;
50
51 // player animation state
52 .float animstate_startframe;
53 .float animstate_numframes;
54 .float animstate_framerate;
55 .float animstate_starttime;
56 .float animstate_endtime;
57 .float animstate_override;
58 .float animstate_looping;
59
60 .float  delay;
61 .float  wait;
62 .float  lip;
63 .float  speed;
64 .float  sounds;
65 .string  platmovetype;
66 .float platmovetype_start, platmovetype_end;
67
68 entity activator;
69
70 .string killtarget;
71
72 .vector pos1, pos2;
73 .vector mangle;
74
75 .string target2;
76 .string target3;
77 .string target4;
78 .string curvetarget;
79 .float target_random;
80 .float trigger_reverse;
81
82 // Keys player is holding
83 .float itemkeys;
84 // message delay for func_door locked by keys and key locks
85 // this field is used on player entities
86 .float key_door_messagetime;
87
88 .vector dest1, dest2;
89
90 #ifdef CSQC
91 // this stuff is defined in the server side engine VM, so we must define it separately here
92 .float takedamage;
93 const float DAMAGE_NO   = 0;
94 const float DAMAGE_YES  = 1;
95 const float DAMAGE_AIM  = 2;
96
97 float   STATE_TOP               = 0;
98 float   STATE_BOTTOM    = 1;
99 float   STATE_UP                = 2;
100 float   STATE_DOWN              = 3;
101
102 .string         noise, noise1, noise2, noise3;  // contains names of wavs to play
103
104 .float          max_health;             // players maximum health is stored here
105 #endif
106
107 #endif