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