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