CSQC handle func_sparks; more to come later (func_pointparticles planned); however...
[divverent/nexuiz.git] / data / qcsrc / client / csqc_constants.qc
1 const entity    NULL                                                    = world;\r
2 \r
3 // Mask Constants (set .drawmask on entities; use R_AddEntities to add all entities based on mask)\r
4 const float             MASK_ENGINE                                             = 1;\r
5 const float             MASK_ENGINEVIEWMODELS                   = 2;\r
6 const float             MASK_NORMAL                                             = 4;\r
7 \r
8 // Renderflag Constants (used for CSQC entities)\r
9 const float             RF_VIEWMODEL                                    = 1;\r
10 const float             RF_EXTERNALMODEL                                = 2;\r
11 const float             RF_DEPTHHACK                                    = 4;\r
12 const float             RF_ADDITIVE                                             = 8;\r
13 const float             RF_USEAXIS                                              = 16;\r
14 \r
15 // Viewflag Constants (use with R_SetView)\r
16 const float             VF_MIN                                                  = 1;    //(vector)\r
17 const float             VF_MIN_X                                                = 2;    //(float)\r
18 const float             VF_MIN_Y                                                = 3;    //(float)\r
19 const float             VF_SIZE                                                 = 4;    //(vector) (viewport size)\r
20 const float             VF_SIZE_Y                                               = 5;    //(float)\r
21 const float             VF_SIZE_X                                               = 6;    //(float)\r
22 const float             VF_VIEWPORT                                             = 7;    //(vector, vector)\r
23 const float             VF_FOV                                                  = 8;    //(vector)\r
24 const float             VF_FOVX                                                 = 9;    //(float)\r
25 const float             VF_FOVY                                                 = 10;   //(float)\r
26 const float             VF_ORIGIN                                               = 11;   //(vector)\r
27 const float             VF_ORIGIN_X                                             = 12;   //(float)\r
28 const float             VF_ORIGIN_Y                                             = 13;   //(float)\r
29 const float             VF_ORIGIN_Z                                             = 14;   //(float)\r
30 const float             VF_ANGLES                                               = 15;   //(vector)\r
31 const float             VF_ANGLES_X                                             = 16;   //(float)\r
32 const float             VF_ANGLES_Y                                             = 17;   //(float)\r
33 const float             VF_ANGLES_Z                                             = 18;   //(float)\r
34 const float             VF_DRAWWORLD                                    = 19;   //(float)\r
35 const float             VF_DRAWENGINESBAR                               = 20;   //(float)\r
36 const float             VF_DRAWCROSSHAIR                                = 21;   //(float)\r
37 const float             VF_PERSPECTIVE                                  = 200;  //(float)\r
38 \r
39 const float             VF_CL_VIEWANGLES                                = 33;   //(vector)\r
40 const float             VF_CL_VIEWANGLES_X                              = 34;   //(float)\r
41 const float             VF_CL_VIEWANGLES_Y                              = 35;   //(float)\r
42 const float             VF_CL_VIEWANGLES_Z                              = 36;   //(float) \r
43 \r
44 // Server Autosent Stat Constants\r
45 const float             STAT_HEALTH                                             = 0;\r
46 const float             STAT_WEAPONMODEL                                = 2;\r
47 const float             STAT_AMMO                                               = 3;\r
48 const float             STAT_ARMOR                                              = 4;\r
49 const float             STAT_WEAPONFRAME                                = 5;\r
50 const float             STAT_SHELLS                                             = 6;\r
51 const float             STAT_NAILS                                              = 7;\r
52 const float             STAT_ROCKETS                                    = 8;\r
53 const float             STAT_CELLS                                              = 9;\r
54 const float             STAT_ACTIVEWEAPON                               = 10;\r
55 const float             STAT_TOTALSECRETS                               = 11;\r
56 const float             STAT_TOTALMONSTERS                              = 12;\r
57 const float             STAT_SECRETS                                    = 13;\r
58 const float             STAT_MONSTERS                                   = 14;\r
59 const float             STAT_ITEMS                                              = 15;\r
60 const float             STAT_VIEWHEIGHT                                 = 16;\r
61 \r
62 const float             STAT_FRAGLIMIT                                  = 235;\r
63 const float             STAT_TIMELIMIT                                  = 236;\r
64 \r
65 // Sound Constants\r
66 const float             CHAN_AUTO                                               = 0;\r
67 const float             CHAN_WEAPON                                             = 1;\r
68 const float             CHAN_VOICE                                              = 2;\r
69 const float             CHAN_ITEM                                               = 3;\r
70 const float             CHAN_BODY                                               = 4;\r
71 \r
72 const float             ATTN_NONE                                               = 0;\r
73 const float             ATTN_NORM                                               = 1;\r
74 const float             ATTN_IDLE                                               = 2;\r
75 const float             ATTN_STATIC                                             = 3;\r
76 \r
77 // Quake-style Point Contents\r
78 const float             CONTENT_EMPTY                                   = -1;\r
79 const float             CONTENT_SOLID                                   = -2;\r
80 const float             CONTENT_WATER                                   = -3;\r
81 const float             CONTENT_SLIME                                   = -4;\r
82 const float             CONTENT_LAVA                                    = -5;\r
83 const float             CONTENT_SKY                                             = -6;\r
84 \r
85 // Boolean Constants\r
86 const float             true                                                    = 1;\r
87 const float             false                                                   = 0;\r
88 const float     TRUE                                                    = 1;\r
89 const float     FALSE                                                   = 0;\r
90 \r
91 // Vector / Hull Constants\r
92 const vector    VEC_1                                                   = '1 1 1';\r
93 const vector    VEC_0                                                   = '0 0 0';\r
94 const vector    VEC_M1                                                  = '-1 -1 -1';\r
95 \r
96 const vector    VEC_HULL_MIN                                    = '-16 -16 -24';\r
97 const vector    VEC_HULL_MAX                                    = '16 16 32';\r
98 \r
99 // Effect Constants\r
100 const float     EF_NODRAW                                               = 16;\r
101 const float     EF_ADDITIVE                                             = 32;\r
102 const float     EF_BLUE                                                 = 64;\r
103 const float     EF_RED                                                  = 128;\r
104 const float     EF_FULLBRIGHT                                   = 512;\r
105 const float     EF_FLAME                                                = 1024;\r
106 const float     EF_STARDUST                                             = 2048;\r
107 const float     EF_NOSHADOW                                             = 4096;\r
108 const float     EF_NODEPTHTEST                                  = 8192;\r
109 \r
110 // Quake Player Flag Constants\r
111 const float     PFL_ONGROUND                                    = 1;\r
112 const float     PFL_CROUCH                                              = 2;\r
113 const float     PFL_DEAD                                                = 4;\r
114 const float     PFL_GIBBED                                              = 8;\r
115 \r
116 // Quake Temporary Entity Constants\r
117 const float             TE_SPIKE                                                = 0;\r
118 const float             TE_SUPERSPIKE                                   = 1;\r
119 const float             TE_GUNSHOT                                              = 2;\r
120 const float             TE_EXPLOSION                                    = 3;\r
121 const float             TE_TAREXPLOSION                                 = 4;\r
122 const float             TE_LIGHTNING1                                   = 5;\r
123 const float             TE_LIGHTNING2                                   = 6;\r
124 const float             TE_WIZSPIKE                                             = 7;\r
125 const float             TE_KNIGHTSPIKE                                  = 8;\r
126 const float             TE_LIGHTNING3                                   = 9;\r
127 const float             TE_LAVASPLASH                                   = 10;\r
128 const float             TE_TELEPORT                                             = 11;\r
129 const float     TE_EXPLOSION2                                   = 12;\r
130 // Darkplaces Additions\r
131 const float     TE_EXPLOSIONRGB                                 = 53;\r
132 const float             TE_GUNSHOTQUAD                                  = 57;\r
133 const float             TE_EXPLOSIONQUAD                                = 70;\r
134 \r
135 // Math Constants\r
136 const float     M_PI                                                    = 3.14159265358979323846;\r
137 const float     EXTRA_LOW                                               = -99999999;\r
138 const float     EXTRA_HIGH                                              = 99999999;\r
139 \r
140 // Frik File Constants\r
141 const float             FILE_READ                                               = 0;\r
142 const float             FILE_APPEND                                             = 1;\r
143 const float             FILE_WRITE                                              = 2;\r
144 \r
145 // Button values used by input_buttons\r
146 const float BUTTON_ATTACK = 1;\r
147 const float BUTTON_JUMP = 2;\r
148 const float BUTTON_3 = 4;\r
149 const float BUTTON_4 = 8;\r
150 const float BUTTON_5 = 16;\r
151 const float BUTTON_6 = 32;\r
152 const float BUTTON7 = 64;\r
153 const float BUTTON8 = 128;\r
154 const float BUTTON_USE = 256;\r
155 const float BUTTON_CHAT = 512;\r
156 const float BUTTON_PRYDONCURSOR = 1024;\r
157 const float BUTTON_9 = 2048;\r
158 const float BUTTON_10 = 4096;\r
159 const float BUTTON_11 = 8192;\r
160 const float BUTTON_12 = 16384;\r
161 const float BUTTON_13 = 32768;\r
162 const float BUTTON_14 = 65536;\r
163 const float BUTTON_15 = 131072;\r
164 const float BUTTON_16 = 262144;\r
165 \r
166 \r
167 const float NEX_IT_UZI              = 1;\r
168 const float NEX_IT_SHOTGUN          = 2;\r
169 const float NEX_IT_GRENADE_LAUNCHER = 4;\r
170 const float NEX_IT_ELECTRO          = 8;\r
171 const float NEX_IT_CRYLINK          = 16;\r
172 const float NEX_IT_NEX              = 32;\r
173 const float NEX_IT_HAGAR            = 64;\r
174 const float NEX_IT_ROCKET_LAUNCHER  = 128;\r
175 const float NEX_IT_SHELLS           = 256;\r
176 const float NEX_IT_BULLETS          = 512;\r
177 const float NEX_IT_ROCKETS          = 1024;\r
178 const float NEX_IT_CELLS            = 2048;\r
179 const float NEX_IT_LASER            = 4094;\r
180 const float NEX_IT_STRENGTH         = 8192;\r
181 const float NEX_IT_INVINCIBLE       = 16384;\r
182 const float NEX_IT_SPEED            = 32768;\r
183 const float NEX_IT_SLOWMO           = 65536;\r
184 \r
185 const float DRAWFLAG_NORMAL = 0;\r
186 const float DRAWFLAG_ADDITIVE = 1;\r
187 const float DRAWFLAG_MODULATE = 2;\r
188 const float DRAWFLAG_2XMODULATE = 3;\r
189 const float DRAWFLAG_NUMFLAGS = 4;\r
190 \r
191 #define        SOLID_NOT                               0               // no interaction with other objects\r
192 #define        SOLID_TRIGGER                   1               // touch on edge, but not blocking\r
193 #define        SOLID_BBOX                              2               // touch on edge, block\r
194 #define        SOLID_SLIDEBOX                  3               // touch on edge, but not an onground\r
195 #define        SOLID_BSP                               4               // bsp clip, touch on edge, block\r
196 #define        SOLID_CORPSE                    5               // same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters)\r