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