]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/subs.qh
Merge branch 'master' into TimePath/csqc_viewmodels
[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(entity this, 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                 _Movetype_LinkEdict(s, true);
35         }
36
37 #endif
38
39 void SUB_SetFade (entity ent, float when, float fading_time);
40 void SUB_VanishOrRemove (entity ent);
41
42 .vector         finaldest, finalangle;          //plat.qc stuff
43 .void()         think1;
44 .float state;
45 .float          t_length, t_width;
46
47 .vector destvec;
48 .vector destvec2;
49
50 .float  delay;
51 .float  wait;
52 .float  lip;
53 .float  speed;
54 .float  sounds;
55 .string  platmovetype;
56 .float platmovetype_start, platmovetype_end;
57
58 entity activator;
59
60 .string killtarget;
61
62 .vector pos1, pos2;
63 .vector mangle;
64
65 .string target2;
66 .string target3;
67 .string target4;
68 .string curvetarget;
69 .float target_random;
70 .float trigger_reverse;
71
72 // Keys player is holding
73 .float itemkeys;
74 // message delay for func_door locked by keys and key locks
75 // this field is used on player entities
76 .float key_door_messagetime;
77
78 .vector dest1, dest2;
79
80 #ifdef CSQC
81 // this stuff is defined in the server side engine VM, so we must define it separately here
82 .float takedamage;
83 const float DAMAGE_NO   = 0;
84 const float DAMAGE_YES  = 1;
85 const float DAMAGE_AIM  = 2;
86
87 float   STATE_TOP               = 0;
88 float   STATE_BOTTOM    = 1;
89 float   STATE_UP                = 2;
90 float   STATE_DOWN              = 3;
91
92 .string         noise, noise1, noise2, noise3;  // contains names of wavs to play
93
94 .float          max_health;             // players maximum health is stored here
95 #endif
96
97 #endif