]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/triggers/subs.qh
Replace all direct assignments to self with setself(e)
[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                 SELFCALL(s, _Movetype_LinkEdict(true));
33                 SELFCALL_DONE();
34         }
35
36 #endif
37
38 void SUB_Remove();
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 // player animation state
51 .float animstate_startframe;
52 .float animstate_numframes;
53 .float animstate_framerate;
54 .float animstate_starttime;
55 .float animstate_endtime;
56 .float animstate_override;
57 .float animstate_looping;
58
59 .float  delay;
60 .float  wait;
61 .float  lip;
62 .float  speed;
63 .float  sounds;
64 .string  platmovetype;
65 .float platmovetype_start, platmovetype_end;
66
67 entity activator;
68
69 .string killtarget;
70
71 .vector pos1, pos2;
72 .vector mangle;
73
74 .string target2;
75 .string target3;
76 .string target4;
77 .string curvetarget;
78 .float target_random;
79 .float trigger_reverse;
80
81 // Keys player is holding
82 .float itemkeys;
83 // message delay for func_door locked by keys and key locks
84 // this field is used on player entities
85 .float key_door_messagetime;
86
87 .vector dest1, dest2;
88
89 #ifdef CSQC
90 // this stuff is defined in the server side engine VM, so we must define it separately here
91 .float takedamage;
92 const float DAMAGE_NO   = 0;
93 const float DAMAGE_YES  = 1;
94 const float DAMAGE_AIM  = 2;
95
96 float   STATE_TOP               = 0;
97 float   STATE_BOTTOM    = 1;
98 float   STATE_UP                = 2;
99 float   STATE_DOWN              = 3;
100
101 .string         noise, noise1, noise2, noise3;  // contains names of wavs to play
102
103 .float          max_health;             // players maximum health is stored here
104 #endif
105
106 #endif