@amxts/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +162 -0
  3. package/README.ru.md +162 -0
  4. package/amxmodx/base/include/amxconst.inc +594 -0
  5. package/amxmodx/base/include/amxmisc.inc +902 -0
  6. package/amxmodx/base/include/amxmodx.inc +3447 -0
  7. package/amxmodx/base/include/amxmodx_version.inc +20 -0
  8. package/amxmodx/base/include/cellarray.inc +525 -0
  9. package/amxmodx/base/include/cellstack.inc +166 -0
  10. package/amxmodx/base/include/celltrie.inc +412 -0
  11. package/amxmodx/base/include/core.inc +202 -0
  12. package/amxmodx/base/include/csstats.inc +298 -0
  13. package/amxmodx/base/include/csstats_const.inc +29 -0
  14. package/amxmodx/base/include/cstrike.inc +1287 -0
  15. package/amxmodx/base/include/cstrike_const.inc +521 -0
  16. package/amxmodx/base/include/csx.inc +259 -0
  17. package/amxmodx/base/include/cvars.inc +547 -0
  18. package/amxmodx/base/include/datapack.inc +161 -0
  19. package/amxmodx/base/include/dbi.inc +154 -0
  20. package/amxmodx/base/include/dodconst.inc +152 -0
  21. package/amxmodx/base/include/dodfun.inc +152 -0
  22. package/amxmodx/base/include/dodstats.inc +69 -0
  23. package/amxmodx/base/include/dodx.inc +161 -0
  24. package/amxmodx/base/include/engine.inc +1343 -0
  25. package/amxmodx/base/include/engine_const.inc +310 -0
  26. package/amxmodx/base/include/engine_stocks.inc +248 -0
  27. package/amxmodx/base/include/esf.inc +70 -0
  28. package/amxmodx/base/include/esf_const.inc +74 -0
  29. package/amxmodx/base/include/fakemeta.inc +1127 -0
  30. package/amxmodx/base/include/fakemeta_const.inc +793 -0
  31. package/amxmodx/base/include/fakemeta_stocks.inc +395 -0
  32. package/amxmodx/base/include/fakemeta_util.inc +882 -0
  33. package/amxmodx/base/include/file.inc +666 -0
  34. package/amxmodx/base/include/float.inc +422 -0
  35. package/amxmodx/base/include/fun.inc +333 -0
  36. package/amxmodx/base/include/gameconfig.inc +93 -0
  37. package/amxmodx/base/include/geoip.inc +264 -0
  38. package/amxmodx/base/include/ham_const.inc +4352 -0
  39. package/amxmodx/base/include/hamsandwich.inc +439 -0
  40. package/amxmodx/base/include/hlsdk_const.inc +808 -0
  41. package/amxmodx/base/include/json.inc +777 -0
  42. package/amxmodx/base/include/lang.inc +119 -0
  43. package/amxmodx/base/include/message_const.inc +1130 -0
  44. package/amxmodx/base/include/message_stocks.inc +161 -0
  45. package/amxmodx/base/include/messages.inc +604 -0
  46. package/amxmodx/base/include/newmenus.inc +387 -0
  47. package/amxmodx/base/include/ns.inc +754 -0
  48. package/amxmodx/base/include/ns_const.inc +196 -0
  49. package/amxmodx/base/include/nvault.inc +154 -0
  50. package/amxmodx/base/include/regex.inc +348 -0
  51. package/amxmodx/base/include/sockets.inc +183 -0
  52. package/amxmodx/base/include/sorting.inc +107 -0
  53. package/amxmodx/base/include/sqlx.inc +582 -0
  54. package/amxmodx/base/include/string.inc +786 -0
  55. package/amxmodx/base/include/string_const.inc +156 -0
  56. package/amxmodx/base/include/string_stocks.inc +325 -0
  57. package/amxmodx/base/include/textparse_ini.inc +214 -0
  58. package/amxmodx/base/include/textparse_smc.inc +261 -0
  59. package/amxmodx/base/include/tfcconst.inc +84 -0
  60. package/amxmodx/base/include/tfcstats.inc +62 -0
  61. package/amxmodx/base/include/tfcx.inc +148 -0
  62. package/amxmodx/base/include/time.inc +118 -0
  63. package/amxmodx/base/include/tsconst.inc +154 -0
  64. package/amxmodx/base/include/tsfun.inc +198 -0
  65. package/amxmodx/base/include/tsstats.inc +65 -0
  66. package/amxmodx/base/include/tsx.inc +88 -0
  67. package/amxmodx/base/include/vault.inc +60 -0
  68. package/amxmodx/base/include/vector.inc +131 -0
  69. package/amxmodx/base/include/xs.inc +1570 -0
  70. package/as/amxts.d.ts +153 -0
  71. package/as/constants.ts +4730 -0
  72. package/as/effects.ts +1449 -0
  73. package/as/entities.ts +5482 -0
  74. package/as/events.ts +3054 -0
  75. package/as/facade.ts +4639 -0
  76. package/as/flags.ts +299 -0
  77. package/as/fs.ts +287 -0
  78. package/as/hooks.ts +18536 -0
  79. package/as/kit.ts +25 -0
  80. package/as/lib/check.ts +86 -0
  81. package/as/modules/http.ts +184 -0
  82. package/as/natives.ts +11845 -0
  83. package/as/os.ts +30 -0
  84. package/as/promise.ts +1392 -0
  85. package/as/promise.types.d.ts +82 -0
  86. package/as/remote.ts +288 -0
  87. package/as/tsconfig.json +22 -0
  88. package/as/vector.ts +65 -0
  89. package/bin/amxts.mjs +10 -0
  90. package/includes/menu_core.inc +355 -0
  91. package/includes/order.txt +54 -0
  92. package/includes/sources.json +27 -0
  93. package/includes/universal_config.inc +355 -0
  94. package/lint/oxlint-plugin.mjs +77 -0
  95. package/node_modules/assemblyscript/LICENSE +201 -0
  96. package/node_modules/assemblyscript/NOTICE +93 -0
  97. package/node_modules/assemblyscript/package.json +63 -0
  98. package/node_modules/assemblyscript/std/README.md +6 -0
  99. package/node_modules/assemblyscript/std/assembly/array.ts +526 -0
  100. package/node_modules/assemblyscript/std/assembly/arraybuffer.ts +77 -0
  101. package/node_modules/assemblyscript/std/assembly/atomics.ts +127 -0
  102. package/node_modules/assemblyscript/std/assembly/bindings/asyncify.ts +16 -0
  103. package/node_modules/assemblyscript/std/assembly/bindings/dom.ts +291 -0
  104. package/node_modules/assemblyscript/std/assembly/bindings/node.ts +6 -0
  105. package/node_modules/assemblyscript/std/assembly/builtins.ts +2631 -0
  106. package/node_modules/assemblyscript/std/assembly/compat.ts +2 -0
  107. package/node_modules/assemblyscript/std/assembly/console.ts +42 -0
  108. package/node_modules/assemblyscript/std/assembly/crypto.ts +9 -0
  109. package/node_modules/assemblyscript/std/assembly/dataview.ts +181 -0
  110. package/node_modules/assemblyscript/std/assembly/date.ts +373 -0
  111. package/node_modules/assemblyscript/std/assembly/diagnostics.ts +11 -0
  112. package/node_modules/assemblyscript/std/assembly/error.ts +44 -0
  113. package/node_modules/assemblyscript/std/assembly/function.ts +38 -0
  114. package/node_modules/assemblyscript/std/assembly/index.d.ts +2822 -0
  115. package/node_modules/assemblyscript/std/assembly/iterator.ts +35 -0
  116. package/node_modules/assemblyscript/std/assembly/map.ts +260 -0
  117. package/node_modules/assemblyscript/std/assembly/math.ts +3289 -0
  118. package/node_modules/assemblyscript/std/assembly/memory.ts +123 -0
  119. package/node_modules/assemblyscript/std/assembly/number.ts +388 -0
  120. package/node_modules/assemblyscript/std/assembly/object.ts +36 -0
  121. package/node_modules/assemblyscript/std/assembly/performance.ts +9 -0
  122. package/node_modules/assemblyscript/std/assembly/polyfills.ts +27 -0
  123. package/node_modules/assemblyscript/std/assembly/process.ts +50 -0
  124. package/node_modules/assemblyscript/std/assembly/reference.ts +48 -0
  125. package/node_modules/assemblyscript/std/assembly/regexp.ts +12 -0
  126. package/node_modules/assemblyscript/std/assembly/rt/README.md +83 -0
  127. package/node_modules/assemblyscript/std/assembly/rt/common.ts +81 -0
  128. package/node_modules/assemblyscript/std/assembly/rt/index-incremental.ts +2 -0
  129. package/node_modules/assemblyscript/std/assembly/rt/index-minimal.ts +2 -0
  130. package/node_modules/assemblyscript/std/assembly/rt/index-stub.ts +1 -0
  131. package/node_modules/assemblyscript/std/assembly/rt/index.d.ts +37 -0
  132. package/node_modules/assemblyscript/std/assembly/rt/itcms.ts +419 -0
  133. package/node_modules/assemblyscript/std/assembly/rt/rtrace.ts +15 -0
  134. package/node_modules/assemblyscript/std/assembly/rt/stub.ts +133 -0
  135. package/node_modules/assemblyscript/std/assembly/rt/tcms.ts +254 -0
  136. package/node_modules/assemblyscript/std/assembly/rt/tlsf.ts +592 -0
  137. package/node_modules/assemblyscript/std/assembly/rt.ts +87 -0
  138. package/node_modules/assemblyscript/std/assembly/set.ts +220 -0
  139. package/node_modules/assemblyscript/std/assembly/shared/feature.ts +65 -0
  140. package/node_modules/assemblyscript/std/assembly/shared/runtime.ts +11 -0
  141. package/node_modules/assemblyscript/std/assembly/shared/target.ts +11 -0
  142. package/node_modules/assemblyscript/std/assembly/shared/tsconfig.json +11 -0
  143. package/node_modules/assemblyscript/std/assembly/shared/typeinfo.ts +72 -0
  144. package/node_modules/assemblyscript/std/assembly/staticarray.ts +401 -0
  145. package/node_modules/assemblyscript/std/assembly/string.ts +847 -0
  146. package/node_modules/assemblyscript/std/assembly/symbol.ts +114 -0
  147. package/node_modules/assemblyscript/std/assembly/table.ts +16 -0
  148. package/node_modules/assemblyscript/std/assembly/tsconfig.json +6 -0
  149. package/node_modules/assemblyscript/std/assembly/typedarray.ts +1945 -0
  150. package/node_modules/assemblyscript/std/assembly/uri.ts +17 -0
  151. package/node_modules/assemblyscript/std/assembly/util/bytes.ts +107 -0
  152. package/node_modules/assemblyscript/std/assembly/util/casemap.ts +497 -0
  153. package/node_modules/assemblyscript/std/assembly/util/error.ts +54 -0
  154. package/node_modules/assemblyscript/std/assembly/util/hash.ts +117 -0
  155. package/node_modules/assemblyscript/std/assembly/util/math.ts +1922 -0
  156. package/node_modules/assemblyscript/std/assembly/util/memory.ts +290 -0
  157. package/node_modules/assemblyscript/std/assembly/util/number.ts +873 -0
  158. package/node_modules/assemblyscript/std/assembly/util/sort.ts +313 -0
  159. package/node_modules/assemblyscript/std/assembly/util/string.ts +1202 -0
  160. package/node_modules/assemblyscript/std/assembly/util/uri.ts +275 -0
  161. package/node_modules/assemblyscript/std/assembly/vector.ts +4 -0
  162. package/node_modules/assemblyscript/std/assembly.json +16 -0
  163. package/node_modules/assemblyscript/std/portable/index.d.ts +462 -0
  164. package/node_modules/assemblyscript/std/portable/index.js +416 -0
  165. package/node_modules/assemblyscript/std/portable.json +11 -0
  166. package/node_modules/assemblyscript/std/types/assembly/index.d.ts +1 -0
  167. package/node_modules/assemblyscript/std/types/assembly/package.json +3 -0
  168. package/node_modules/assemblyscript/std/types/portable/index.d.ts +1 -0
  169. package/node_modules/assemblyscript/std/types/portable/package.json +3 -0
  170. package/node_modules/assemblyscript/tsconfig-base.json +13 -0
  171. package/package.json +112 -0
  172. package/runtime/deps/assemblyscript/LICENSE +201 -0
  173. package/runtime/deps/assemblyscript/NOTICE +93 -0
  174. package/runtime/deps/assemblyscript/bin/asc.js +35 -0
  175. package/runtime/deps/assemblyscript/dist/asc.js +25035 -0
  176. package/runtime/deps/assemblyscript/dist/assemblyscript.js +337 -0
  177. package/runtime/deps/assemblyscript/node_modules/binaryen/LICENSE +201 -0
  178. package/runtime/deps/assemblyscript/node_modules/binaryen/index.js +28905 -0
  179. package/runtime/deps/assemblyscript/node_modules/binaryen/package.json +50 -0
  180. package/runtime/deps/assemblyscript/node_modules/long/LICENSE +202 -0
  181. package/runtime/deps/assemblyscript/node_modules/long/index.js +1581 -0
  182. package/runtime/deps/assemblyscript/node_modules/long/package.json +58 -0
  183. package/runtime/deps/assemblyscript/package.json +114 -0
  184. package/runtime/host/amxts.inc +85 -0
  185. package/runtime/licenses/AMXX-LICENSE.txt +34 -0
  186. package/runtime/licenses/AssemblyScript-LICENSE +201 -0
  187. package/runtime/licenses/AssemblyScript-NOTICE +93 -0
  188. package/runtime/licenses/Binaryen-LICENSE +201 -0
  189. package/runtime/licenses/Bun-LICENSE.md +84 -0
  190. package/runtime/licenses/GPL-3.0.txt +674 -0
  191. package/runtime/licenses/LLVM-LICENSE.TXT +279 -0
  192. package/runtime/licenses/README.md +25 -0
  193. package/runtime/licenses/WAMR-LICENSE +219 -0
  194. package/runtime/natives.txt +1095 -0
  195. package/runtime/patches/README.md +59 -0
  196. package/runtime/patches/assemblyscript-0.28.20-amxts.patch +14174 -0
  197. package/runtime/patches/wamr-2.4.5-amxts.patch +364 -0
  198. package/scripts/apply-docs.ts +508 -0
  199. package/scripts/asc.ts +27 -0
  200. package/scripts/auto-imports.ts +258 -0
  201. package/scripts/build-wasm.ts +595 -0
  202. package/scripts/check.ts +93 -0
  203. package/scripts/compile-cache.ts +179 -0
  204. package/scripts/compile.ts +401 -0
  205. package/scripts/docker-server.ts +73 -0
  206. package/scripts/docs/as/amxts.ts +210 -0
  207. package/scripts/docs/as/effects.ts +1684 -0
  208. package/scripts/docs/as/facade.ts +3302 -0
  209. package/scripts/docs/as/fs.ts +173 -0
  210. package/scripts/docs/as/lib/check.ts +68 -0
  211. package/scripts/docs/as/modules/http.ts +66 -0
  212. package/scripts/docs/as/os.ts +16 -0
  213. package/scripts/docs/as/promise.ts +132 -0
  214. package/scripts/docs/as/promise.types.ts +63 -0
  215. package/scripts/docs/as/vector.ts +48 -0
  216. package/scripts/docs/entities.ts +2338 -0
  217. package/scripts/docs/events.ts +245 -0
  218. package/scripts/docs/game.ts +497 -0
  219. package/scripts/docs/messages.ts +148 -0
  220. package/scripts/file-contents.ts +74 -0
  221. package/scripts/includes.ts +134 -0
  222. package/scripts/player-fields.ts +866 -0
  223. package/scripts/plugin-cache.ts +92 -0
  224. package/scripts/plugin-natives.ts +1157 -0
  225. package/scripts/prebuilt.ts +268 -0
  226. package/scripts/prepare.ts +134 -0
  227. package/scripts/project.ts +973 -0
  228. package/scripts/run.ts +28 -0
  229. package/scripts/shared-modules.ts +906 -0
  230. package/scripts/system.ts +33 -0
  231. package/scripts/tracked-fs.ts +115 -0
  232. package/scripts/typed-configs.ts +788 -0
  233. package/scripts/ui.ts +77 -0
  234. package/src/cli-api.mjs +175 -0
  235. package/src/parser/include-parser.ts +506 -0
  236. package/src/system.mjs +155 -0
  237. package/src/testing/compile-cache.ts +31 -0
  238. package/src/testing/compile.ts +222 -0
  239. package/src/testing/coroutines.ts +191 -0
  240. package/src/testing/index.ts +39 -0
  241. package/src/testing/kits.ts +55 -0
  242. package/src/testing/memory.ts +125 -0
  243. package/src/testing/natives.ts +925 -0
  244. package/src/testing/server.ts +1874 -0
  245. package/src/testing/setup.ts +63 -0
  246. package/src/testing/tables.ts +139 -0
  247. package/src/types.ts +51 -0
@@ -0,0 +1,1130 @@
1
+ // vim: set ts=4 sw=4 tw=99 noet:
2
+ //
3
+ // AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
4
+ // Copyright (C) The AMX Mod X Development Team.
5
+ //
6
+ // This software is licensed under the GNU General Public License, version 3 or higher.
7
+ // Additional exceptions apply. For full license details, see LICENSE.txt or visit:
8
+ // https://alliedmods.net/amxmodx-license
9
+
10
+ //
11
+ // Message Constants
12
+ //
13
+
14
+ #if defined _message_const_included
15
+ #endinput
16
+ #endif
17
+ #define _message_const_included
18
+
19
+ /**
20
+ * Destination types for message_begin()
21
+ */
22
+ #define MSG_BROADCAST 0 // Unreliable to all
23
+ #define MSG_ONE 1 // Reliable to one (msg_entity)
24
+ #define MSG_ALL 2 // Reliable to all
25
+ #define MSG_INIT 3 // Write to the init string
26
+ #define MSG_PVS 4 // Ents in PVS of org
27
+ #define MSG_PAS 5 // Ents in PAS of org
28
+ #define MSG_PVS_R 6 // Reliable to PVS
29
+ #define MSG_PAS_R 7 // Reliable to PAS
30
+ #define MSG_ONE_UNRELIABLE 8 // Send to one client, but don't put in reliable stream, put in unreliable datagram (could be dropped)
31
+ #define MSG_SPEC 9 // Sends to all spectator proxies
32
+
33
+ /**
34
+ * Hardcoded message types for message_begin()
35
+ *
36
+ * @note Look at the actual HLSDK for details
37
+ */
38
+ #define SVC_BAD 0
39
+ #define SVC_NOP 1
40
+ #define SVC_DISCONNECT 2
41
+ #define SVC_EVENT 3
42
+ #define SVC_VERSION 4
43
+ #define SVC_SETVIEW 5
44
+ #define SVC_SOUND 6
45
+ #define SVC_TIME 7
46
+ #define SVC_PRINT 8
47
+ #define SVC_STUFFTEXT 9
48
+ #define SVC_SETANGLE 10
49
+ #define SVC_SERVERINFO 11
50
+ #define SVC_LIGHTSTYLE 12
51
+ #define SVC_UPDATEUSERINFO 13
52
+ #define SVC_DELTADESCRIPTION 14
53
+ #define SVC_CLIENTDATA 15
54
+ #define SVC_STOPSOUND 16
55
+ #define SVC_PINGS 17
56
+ #define SVC_PARTICLE 18
57
+ #define SVC_DAMAGE 19
58
+ #define SVC_SPAWNSTATIC 20
59
+ #define SVC_EVENT_RELIABLE 21
60
+ #define SVC_SPAWNBASELINE 22
61
+ #define SVC_TEMPENTITY 23
62
+ #define SVC_SETPAUSE 24
63
+ #define SVC_SIGNONNUM 25
64
+ #define SVC_CENTERPRINT 26
65
+ #define SVC_KILLEDMONSTER 27
66
+ #define SVC_FOUNDSECRET 28
67
+ #define SVC_SPAWNSTATICSOUND 29
68
+ #define SVC_INTERMISSION 30
69
+ #define SVC_FINALE 31
70
+ #define SVC_CDTRACK 32
71
+ #define SVC_RESTORE 33
72
+ #define SVC_CUTSCENE 34
73
+ #define SVC_WEAPONANIM 35
74
+ #define SVC_DECALNAME 36
75
+ #define SVC_ROOMTYPE 37
76
+ #define SVC_ADDANGLE 38
77
+ #define SVC_NEWUSERMSG 39
78
+ #define SVC_PACKETENTITIES 40
79
+ #define SVC_DELTAPACKETENTITIES 41
80
+ #define SVC_CHOKE 42
81
+ #define SVC_RESOURCELIST 43
82
+ #define SVC_NEWMOVEVARS 44
83
+ #define SVC_RESOURCEREQUEST 45
84
+ #define SVC_CUSTOMIZATION 46
85
+ #define SVC_CROSSHAIRANGLE 47
86
+ #define SVC_SOUNDFADE 48
87
+ #define SVC_FILETXFERFAILED 49
88
+ #define SVC_HLTV 50
89
+ #define SVC_DIRECTOR 51
90
+ #define SVC_VOICEINIT 52
91
+ #define SVC_VOICEDATA 53
92
+ #define SVC_SENDEXTRAINFO 54
93
+ #define SVC_TIMESCALE 55
94
+ #define SVC_RESOURCELOCATION 56
95
+ #define SVC_SENDCVARVALUE 57
96
+ #define SVC_SENDCVARVALUE2 58
97
+
98
+ /**
99
+ * Flags for set_msg_block()
100
+ */
101
+ #define BLOCK_NOT 0
102
+ #define BLOCK_ONCE 1
103
+ #define BLOCK_SET 2
104
+
105
+ /**
106
+ * Message argument types used with get_msg_argtype() and set_msg_arg_*
107
+ */
108
+ enum
109
+ {
110
+ ARG_BYTE = 1, /* int */
111
+ ARG_CHAR, /* int */
112
+ ARG_SHORT, /* int */
113
+ ARG_LONG, /* int */
114
+ ARG_ANGLE, /* float */
115
+ ARG_COORD, /* float */
116
+ ARG_STRING, /* string */
117
+ ARG_ENTITY, /* int */
118
+ };
119
+
120
+ /**
121
+ * @section TempEntity messages for message_begin()
122
+ */
123
+
124
+ /**
125
+ * Beam effect between two points
126
+ *
127
+ * @note
128
+ * write_byte(TE_BEAMPOINTS)
129
+ * write_coord(startposition.x)
130
+ * write_coord(startposition.y)
131
+ * write_coord(startposition.z)
132
+ * write_coord(endposition.x)
133
+ * write_coord(endposition.y)
134
+ * write_coord(endposition.z)
135
+ * write_short(sprite index)
136
+ * write_byte(starting frame)
137
+ * write_byte(frame rate in 0.1's)
138
+ * write_byte(life in 0.1's)
139
+ * write_byte(line width in 0.1's)
140
+ * write_byte(noise amplitude in 0.01's)
141
+ * write_byte(red)
142
+ * write_byte(green)
143
+ * write_byte(blue)
144
+ * write_byte(brightness)
145
+ * write_byte(scroll speed in 0.1's)
146
+ */
147
+ #define TE_BEAMPOINTS 0
148
+
149
+ /**
150
+ * Beam effect between a point and an entity
151
+ *
152
+ * @note
153
+ * write_byte(TE_BEAMENTPOINT)
154
+ * write_short(start entity)
155
+ * write_coord(endposition.x)
156
+ * write_coord(endposition.y)
157
+ * write_coord(endposition.z)
158
+ * write_short(sprite index)
159
+ * write_byte(starting frame)
160
+ * write_byte(frame rate in 0.1's)
161
+ * write_byte(life in 0.1's)
162
+ * write_byte(line width in 0.1's)
163
+ * write_byte(noise amplitude in 0.01's)
164
+ * write_byte(red)
165
+ * write_byte(green)
166
+ * write_byte(blue)
167
+ * write_byte(brightness)
168
+ * write_byte(scroll speed in 0.1's)
169
+ */
170
+ #define TE_BEAMENTPOINT 1
171
+
172
+ /**
173
+ * Particle effect plus ricochet sound
174
+ *
175
+ * @note
176
+ * write_byte(TE_GUNSHOT)
177
+ * write_coord(position.x)
178
+ * write_coord(position.y)
179
+ * write_coord(position.z)
180
+ */
181
+ #define TE_GUNSHOT 2
182
+
183
+ /**
184
+ * Additive sprite, 2 dynamic lights, flickering particles, explosion sound,
185
+ * move vertically 8 pps
186
+ *
187
+ * @note
188
+ * write_byte(TE_EXPLOSION)
189
+ * write_coord(position.x)
190
+ * write_coord(position.y)
191
+ * write_coord(position.z)
192
+ * write_short(sprite index)
193
+ * write_byte(scale in 0.1's)
194
+ * write_byte(framerate)
195
+ * write_byte(flags)
196
+ */
197
+ #define TE_EXPLOSION 3
198
+
199
+ /**
200
+ * Flags for the TE_EXPLOSION effect, controlling its performance and aesthetic
201
+ * features
202
+ */
203
+ #define TE_EXPLFLAG_NONE 0 // All flags clear makes default Half-Life explosion
204
+ #define TE_EXPLFLAG_NOADDITIVE 1 // Sprite will be drawn opaque (ensure that the sprite you send is a non-additive sprite)
205
+ #define TE_EXPLFLAG_NODLIGHTS 2 // Do not render dynamic lights
206
+ #define TE_EXPLFLAG_NOSOUND 4 // Do not play client explosion sound
207
+ #define TE_EXPLFLAG_NOPARTICLES 8 // Do not draw particles
208
+
209
+ /**
210
+ * Quake1 "tarbaby" explosion with sound
211
+ *
212
+ * @note
213
+ * write_byte(TE_TAREXPLOSION)
214
+ * write_coord(position.x)
215
+ * write_coord(position.y)
216
+ * write_coord(position.z)
217
+ */
218
+ #define TE_TAREXPLOSION 4
219
+
220
+ /**
221
+ * Alphablend sprite, move vertically 30pps
222
+ *
223
+ * @note
224
+ * write_byte(TE_SMOKE)
225
+ * write_coord(position.x)
226
+ * write_coord(position.y)
227
+ * write_coord(position.z)
228
+ * write_short(sprite index)
229
+ * write_byte(scale in 0.1's)
230
+ * write_byte(framerate)
231
+ */
232
+ #define TE_SMOKE 5
233
+
234
+ /**
235
+ * Tracer effect from point to point
236
+ *
237
+ * @note
238
+ * write_byte(TE_TRACER)
239
+ * write_coord(startposition.x)
240
+ * write_coord(startposition.y)
241
+ * write_coord(startposition.z)
242
+ * write_coord(endposition.x)
243
+ * write_coord(endposition.y)
244
+ * write_coord(endposition.z)
245
+ */
246
+ #define TE_TRACER 6
247
+
248
+ /**
249
+ * TE_BEAMPOINTS with simplified parameters
250
+ *
251
+ * @note
252
+ * write_byte(TE_LIGHTNING)
253
+ * write_coord(startposition.x)
254
+ * write_coord(startposition.y)
255
+ * write_coord(startposition.z)
256
+ * write_coord(endposition.x)
257
+ * write_coord(endposition.y)
258
+ * write_coord(endposition.z)
259
+ * write_byte(life in 0.1's)
260
+ * write_byte(width in 0.1's)
261
+ * write_byte(amplitude in 0.01's)
262
+ * write_short(sprite model index)
263
+ */
264
+ #define TE_LIGHTNING 7
265
+
266
+ /**
267
+ * TE_BEAMENTS
268
+ *
269
+ * @note
270
+ * write_byte(TE_BEAMENTS)
271
+ * write_short(start entity)
272
+ * write_short(end entity)
273
+ * write_short(sprite index)
274
+ * write_byte(starting frame)
275
+ * write_byte(frame rate in 0.1's)
276
+ * write_byte(life in 0.1's)
277
+ * write_byte(line width in 0.1's)
278
+ * write_byte(noise amplitude in 0.01's)
279
+ * write_byte(red)
280
+ * write_byte(green)
281
+ * write_byte(blue)
282
+ * write_byte(brightness)
283
+ * write_byte(scroll speed in 0.1's)
284
+ */
285
+ #define TE_BEAMENTS 8
286
+
287
+ /**
288
+ * 8 random tracers with gravity, ricochet sprite
289
+ *
290
+ * @note
291
+ * write_byte(TE_SPARKS)
292
+ * write_coord(position.x)
293
+ * write_coord(position.y)
294
+ * write_coord(position.z)
295
+ */
296
+ #define TE_SPARKS 9
297
+
298
+ /**
299
+ * Quake1 lava splash
300
+ *
301
+ * @note
302
+ * write_byte(TE_LAVASPLASH)
303
+ * write_coord(position.x)
304
+ * write_coord(position.y)
305
+ * write_coord(position.z)
306
+ */
307
+ #define TE_LAVASPLASH 10
308
+
309
+ /**
310
+ * Quake1 teleport splash
311
+ *
312
+ * @note
313
+ * write_byte(TE_TELEPORT)
314
+ * write_coord(position.x)
315
+ * write_coord(position.y)
316
+ * write_coord(position.z)
317
+ */
318
+ #define TE_TELEPORT 11
319
+
320
+ /**
321
+ * Quake1 colormaped (base palette) particle explosion with sound
322
+ *
323
+ * @note
324
+ * write_byte(TE_EXPLOSION2)
325
+ * write_coord(position.x)
326
+ * write_coord(position.y)
327
+ * write_coord(position.z)
328
+ * write_byte(starting color)
329
+ * write_byte(num colors)
330
+ */
331
+ #define TE_EXPLOSION2 12
332
+
333
+ /**
334
+ * Decal from the .BSP file
335
+ *
336
+ * @note
337
+ * write_byte(TE_BSPDECAL)
338
+ * write_coord(position.x) decal position (center of texture in world)
339
+ * write_coord(position.y)
340
+ * write_coord(position.z)
341
+ * write_short(texture index of precached decal texture name)
342
+ * write_short(entity index)
343
+ * [optional - write_short(index of model of above entity) only included if previous short is non-zero (not the world)]
344
+ */
345
+ #define TE_BSPDECAL 13
346
+
347
+ /**
348
+ * Tracers moving toward a point
349
+ *
350
+ * @note
351
+ * write_byte(TE_IMPLOSION)
352
+ * write_coord(position.x)
353
+ * write_coord(position.y)
354
+ * write_coord(position.z)
355
+ * write_byte(radius)
356
+ * write_byte(count)
357
+ * write_byte(life in 0.1's)
358
+ */
359
+ #define TE_IMPLOSION 14
360
+
361
+ /**
362
+ * Line of moving glow sprites with gravity, fadeout, and collisions
363
+ *
364
+ * @note
365
+ * write_byte(TE_SPRITETRAIL)
366
+ * write_coord(startposition.x)
367
+ * write_coord(startposition.y)
368
+ * write_coord(startposition.z)
369
+ * write_coord(endposition.x)
370
+ * write_coord(endposition.y)
371
+ * write_coord(endposition.z)
372
+ * write_short(sprite index)
373
+ * write_byte(count)
374
+ * write_byte(life in 0.1's)
375
+ * write_byte(scale in 0.1's)
376
+ * write_byte(velocity along vector in 10's)
377
+ * write_byte(randomness of velocity in 10's)
378
+ */
379
+ #define TE_SPRITETRAIL 15
380
+
381
+ /**
382
+ * Additive sprite, plays 1 cycle
383
+ *
384
+ * @note
385
+ * write_byte(TE_SPRITE)
386
+ * write_coord(position.x)
387
+ * write_coord(position.y)
388
+ * write_coord(position.z)
389
+ * write_short(sprite index)
390
+ * write_byte(scale in 0.1's)
391
+ * write_byte(brightness)
392
+ */
393
+ #define TE_SPRITE 17
394
+
395
+ /**
396
+ * A beam with a sprite at the end
397
+ *
398
+ * @note
399
+ * write_byte(TE_BEAMSPRITE)
400
+ * write_coord(startposition.x)
401
+ * write_coord(startposition.y)
402
+ * write_coord(startposition.z)
403
+ * write_coord(endposition.x)
404
+ * write_coord(endposition.y)
405
+ * write_coord(endposition.z)
406
+ * write_short(beam sprite index)
407
+ * write_short(end sprite index)
408
+ */
409
+ #define TE_BEAMSPRITE 18
410
+
411
+ /**
412
+ * Screen aligned beam ring, expands to max radius over lifetime
413
+ *
414
+ * @note
415
+ * write_byte(TE_BEAMTORUS)
416
+ * write_coord(position.x)
417
+ * write_coord(position.y)
418
+ * write_coord(position.z)
419
+ * write_coord(axis.x)
420
+ * write_coord(axis.y)
421
+ * write_coord(axis.z)
422
+ * write_short(sprite index)
423
+ * write_byte(starting frame)
424
+ * write_byte(frame rate in 0.1's)
425
+ * write_byte(life in 0.1's)
426
+ * write_byte(line width in 0.1's)
427
+ * write_byte(noise amplitude in 0.01's)
428
+ * write_byte(red)
429
+ * write_byte(green)
430
+ * write_byte(blue)
431
+ * write_byte(brightness)
432
+ * write_byte(scroll speed in 0.1's)
433
+ */
434
+ #define TE_BEAMTORUS 19
435
+
436
+ /**
437
+ * Disk that expands to max radius over lifetime
438
+ *
439
+ * @note
440
+ * write_byte(TE_BEAMDISK)
441
+ * write_coord(position.x)
442
+ * write_coord(position.y)
443
+ * write_coord(position.z)
444
+ * write_coord(axis.x)
445
+ * write_coord(axis.y)
446
+ * write_coord(axis.z)
447
+ * write_short(sprite index)
448
+ * write_byte(starting frame)
449
+ * write_byte(frame rate in 0.1's)
450
+ * write_byte(life in 0.1's)
451
+ * write_byte(line width in 0.1's)
452
+ * write_byte(noise amplitude in 0.01's)
453
+ * write_byte(red)
454
+ * write_byte(green)
455
+ * write_byte(blue)
456
+ * write_byte(brightness)
457
+ * write_byte(scroll speed in 0.1's)
458
+ */
459
+ #define TE_BEAMDISK 20
460
+
461
+ /**
462
+ * Cylinder that expands to max radius over lifetime
463
+ *
464
+ * @note
465
+ * write_byte(TE_BEAMCYLINDER)
466
+ * write_coord(position.x)
467
+ * write_coord(position.y)
468
+ * write_coord(position.z)
469
+ * write_coord(axis.x)
470
+ * write_coord(axis.y)
471
+ * write_coord(axis.z)
472
+ * write_short(sprite index)
473
+ * write_byte(starting frame)
474
+ * write_byte(frame rate in 0.1's)
475
+ * write_byte(life in 0.1's)
476
+ * write_byte(line width in 0.1's)
477
+ * write_byte(noise amplitude in 0.01's)
478
+ * write_byte(red)
479
+ * write_byte(green)
480
+ * write_byte(blue)
481
+ * write_byte(brightness)
482
+ * write_byte(scroll speed in 0.1's)
483
+ */
484
+ #define TE_BEAMCYLINDER 21
485
+
486
+ /**
487
+ * Create a line of decaying beam segments until entity stops moving
488
+ *
489
+ * @note
490
+ * write_byte(TE_BEAMFOLLOW)
491
+ * write_short(entity:attachment to follow)
492
+ * write_short(sprite index)
493
+ * write_byte(life in 0.1's)
494
+ * write_byte(line width in 0.1's)
495
+ * write_byte(red)
496
+ * write_byte(green)
497
+ * write_byte(blue)
498
+ * write_byte(brightness)
499
+ */
500
+ #define TE_BEAMFOLLOW 22
501
+
502
+ /**
503
+ * TE_GLOWSPRITE
504
+ *
505
+ * @note
506
+ * write_byte(TE_GLOWSPRITE)
507
+ * write_coord(position.x)
508
+ * write_coord(position.y)
509
+ * write_coord(position.z)
510
+ * write_short(model index)
511
+ * write_byte(scale / 10)
512
+ * write_byte(size)
513
+ * write_byte(brightness)
514
+ */
515
+ #define TE_GLOWSPRITE 23
516
+
517
+ /**
518
+ * Connect a beam ring to two entities
519
+ *
520
+ * @note
521
+ * write_byte(TE_BEAMRING)
522
+ * write_short(start entity)
523
+ * write_short(end entity)
524
+ * write_short(sprite index)
525
+ * write_byte(starting frame)
526
+ * write_byte(frame rate in 0.1's)
527
+ * write_byte(life in 0.1's)
528
+ * write_byte(line width in 0.1's)
529
+ * write_byte(noise amplitude in 0.01's)
530
+ * write_byte(red)
531
+ * write_byte(green)
532
+ * write_byte(blue)
533
+ * write_byte(brightness)
534
+ * write_byte(scroll speed in 0.1's)
535
+ */
536
+ #define TE_BEAMRING 24
537
+
538
+ /**
539
+ * Oriented shower of tracers
540
+ *
541
+ * @note
542
+ * write_byte(TE_STREAK_SPLASH)
543
+ * write_coord(startposition.x)
544
+ * write_coord(startposition.y)
545
+ * write_coord(startposition.z)
546
+ * write_coord(vector.x)
547
+ * write_coord(vector.y)
548
+ * write_coord(vector.z)
549
+ * write_byte(color)
550
+ * write_short(count)
551
+ * write_short(base speed)
552
+ * write_short(random velocity)
553
+ */
554
+ #define TE_STREAK_SPLASH 25
555
+
556
+ /**
557
+ * Dynamic light, effect world, minor entity effect
558
+ *
559
+ * @note
560
+ * write_byte(TE_DLIGHT)
561
+ * write_coord(position.x)
562
+ * write_coord(position.y)
563
+ * write_coord(position.z)
564
+ * write_byte(radius in 10's)
565
+ * write_byte(red)
566
+ * write_byte(green)
567
+ * write_byte(blue)
568
+ * write_byte(life in 10's)
569
+ * write_byte(decay rate in 10's)
570
+ */
571
+ #define TE_DLIGHT 27
572
+
573
+ /**
574
+ * Point entity light, no world effect
575
+ *
576
+ * @note
577
+ * write_byte(TE_ELIGHT)
578
+ * write_short(entity:attachment to follow)
579
+ * write_coord(position.x)
580
+ * write_coord(position.y)
581
+ * write_coord(position.z)
582
+ * write_coord(radius)
583
+ * write_byte(red)
584
+ * write_byte(green)
585
+ * write_byte(blue)
586
+ * write_byte(life in 0.1's)
587
+ * write_coord(decay rate)
588
+ */
589
+ #define TE_ELIGHT 28
590
+
591
+ /**
592
+ * TE_TEXTMESSAGE
593
+ *
594
+ * @note
595
+ * write_byte(TE_TEXTMESSAGE)
596
+ * write_byte(channel)
597
+ * write_short(x) -1 = center)
598
+ * write_short(y) -1 = center)
599
+ * write_byte(effect) 0 = fade in/fade out, 1 is flickery credits, 2 is write out (training room)
600
+ * write_byte(red) - text color
601
+ * write_byte(green)
602
+ * write_byte(blue)
603
+ * write_byte(alpha)
604
+ * write_byte(red) - effect color
605
+ * write_byte(green)
606
+ * write_byte(blue)
607
+ * write_byte(alpha)
608
+ * write_short(fadein time)
609
+ * write_short(fadeout time)
610
+ * write_short(hold time)
611
+ * [optional] write_short(fxtime) time the highlight lags behing the leading text in effect 2
612
+ * write_string(text message) 512 chars max string size
613
+ */
614
+ #define TE_TEXTMESSAGE 29
615
+
616
+ /**
617
+ * TE_LINE
618
+ *
619
+ * @note
620
+ * write_byte(TE_LINE)
621
+ * write_coord(startposition.x)
622
+ * write_coord(startposition.y)
623
+ * write_coord(startposition.z)
624
+ * write_coord(endposition.x)
625
+ * write_coord(endposition.y)
626
+ * write_coord(endposition.z)
627
+ * write_short(life in 0.1 s)
628
+ * write_byte(red)
629
+ * write_byte(green)
630
+ * write_byte(blue)
631
+ */
632
+ #define TE_LINE 30
633
+
634
+ /**
635
+ * TE_BOX
636
+ *
637
+ * @note
638
+ * write_byte(TE_BOX)
639
+ * write_coord(boxmins.x)
640
+ * write_coord(boxmins.y)
641
+ * write_coord(boxmins.z)
642
+ * write_coord(boxmaxs.x)
643
+ * write_coord(boxmaxs.y)
644
+ * write_coord(boxmaxs.z)
645
+ * write_short(life in 0.1 s)
646
+ * write_byte(red)
647
+ * write_byte(green)
648
+ * write_byte(blue)
649
+ */
650
+ #define TE_BOX 31
651
+
652
+ /**
653
+ * Kill all beams attached to entity
654
+ *
655
+ * @note
656
+ * write_byte(TE_KILLBEAM)
657
+ * write_short(entity)
658
+ */
659
+ #define TE_KILLBEAM 99
660
+
661
+ /**
662
+ * TE_LARGEFUNNEL
663
+ *
664
+ * @note
665
+ * write_byte(TE_LARGEFUNNEL)
666
+ * write_coord(position.x)
667
+ * write_coord(position.y)
668
+ * write_coord(position.z)
669
+ * write_short(sprite index)
670
+ * write_short(flags)
671
+ */
672
+ #define TE_LARGEFUNNEL 100
673
+
674
+ /**
675
+ * Particle spray
676
+ *
677
+ * @note
678
+ * write_byte(TE_BLOODSTREAM)
679
+ * write_coord(position.x)
680
+ * write_coord(position.y)
681
+ * write_coord(position.z)
682
+ * write_coord(vector.x)
683
+ * write_coord(vector.y)
684
+ * write_coord(vector.z)
685
+ * write_byte(color)
686
+ * write_byte(speed)
687
+ */
688
+ #define TE_BLOODSTREAM 101
689
+
690
+ /**
691
+ * Line of particles every 5 units, dies in 30 seconds
692
+ *
693
+ * @note
694
+ * write_byte(TE_SHOWLINE)
695
+ * write_coord(startposition.x)
696
+ * write_coord(startposition.y)
697
+ * write_coord(startposition.z)
698
+ * write_coord(endposition.x)
699
+ * write_coord(endposition.y)
700
+ * write_coord(endposition.z)
701
+ */
702
+ #define TE_SHOWLINE 102
703
+
704
+ /**
705
+ * Particle spray
706
+ *
707
+ * @note
708
+ * write_byte(TE_BLOOD)
709
+ * write_coord(position.x)
710
+ * write_coord(position.y)
711
+ * write_coord(position.z)
712
+ * write_coord(vector.x)
713
+ * write_coord(vector.y)
714
+ * write_coord(vector.z)
715
+ * write_byte(color)
716
+ * write_byte(speed)
717
+ */
718
+ #define TE_BLOOD 103
719
+
720
+ /**
721
+ * Decal applied to a brush entity (not the world)
722
+ *
723
+ * @note
724
+ * write_byte(TE_DECAL)
725
+ * write_coord(position.x) decal position (center of texture in world)
726
+ * write_coord(position.y)
727
+ * write_coord(position.z)
728
+ * write_byte(texture index of precached decal texture name)
729
+ * write_short(entity index)
730
+ */
731
+ #define TE_DECAL 104
732
+
733
+ /**
734
+ * Create alpha sprites inside of entity, float upwards
735
+ *
736
+ * @note
737
+ * write_byte(TE_FIZZ)
738
+ * write_short(entity)
739
+ * write_short(sprite index)
740
+ * write_byte(density)
741
+ */
742
+ #define TE_FIZZ 105
743
+
744
+ /**
745
+ * Create a moving model that bounces and makes a sound when it hits
746
+ *
747
+ * @note
748
+ * write_byte(TE_MODEL)
749
+ * write_coord(position.x)
750
+ * write_coord(position.y)
751
+ * write_coord(position.z)
752
+ * write_coord(velocity.x)
753
+ * write_coord(velocity.y)
754
+ * write_coord(velocity.z)
755
+ * write_angle(initial yaw)
756
+ * write_short(model index)
757
+ * write_byte(bounce sound type)
758
+ * write_byte(life in 0.1's)
759
+ */
760
+ #define TE_MODEL 106
761
+
762
+ /**
763
+ * Spherical shower of models, picks from set
764
+ *
765
+ * @note
766
+ * write_byte(TE_EXPLODEMODEL)
767
+ * write_coord(origin.x)
768
+ * write_coord(origin.y)
769
+ * write_coord(origin.z)
770
+ * write_coord(velocity.x)
771
+ * write_coord(velocity.y)
772
+ * write_coord(velocity.z)
773
+ * write_short(model index)
774
+ * write_short(count)
775
+ * write_byte(life in 0.1's)
776
+ */
777
+ #define TE_EXPLODEMODEL 107
778
+
779
+ /**
780
+ * Box of models or sprites
781
+ *
782
+ * @note
783
+ * write_byte(TE_BREAKMODEL)
784
+ * write_coord(position.x)
785
+ * write_coord(position.y)
786
+ * write_coord(position.z)
787
+ * write_coord(size.x)
788
+ * write_coord(size.y)
789
+ * write_coord(size.z)
790
+ * write_coord(velocity.x)
791
+ * write_coord(velocity.y)
792
+ * write_coord(velocity.z)
793
+ * write_byte(random velocity in 10's)
794
+ * write_short(sprite or model index)
795
+ * write_byte(count)
796
+ * write_byte(life in 0.1 secs)
797
+ * write_byte(flags)
798
+ */
799
+ #define TE_BREAKMODEL 108
800
+
801
+ /**
802
+ * Decal and ricochet sound
803
+ *
804
+ * @note
805
+ * write_byte(TE_GUNSHOTDECAL)
806
+ * write_coord(position.x)
807
+ * write_coord(position.y)
808
+ * write_coord(position.z)
809
+ * write_short(entity index???)
810
+ * write_byte(decal???)
811
+ */
812
+ #define TE_GUNSHOTDECAL 109
813
+
814
+ /**
815
+ * Spray of alpha sprites
816
+ *
817
+ * @note
818
+ * write_byte(TE_SPRITE_SPRAY)
819
+ * write_coord(position.x)
820
+ * write_coord(position.y)
821
+ * write_coord(position.z)
822
+ * write_coord(velocity.x)
823
+ * write_coord(velocity.y)
824
+ * write_coord(velocity.z)
825
+ * write_short(sprite index)
826
+ * write_byte(count)
827
+ * write_byte(speed)
828
+ * write_byte(noise)
829
+ */
830
+ #define TE_SPRITE_SPRAY 110
831
+
832
+ /**
833
+ * Quick spark sprite, client ricochet sound.
834
+ *
835
+ * @note
836
+ * write_byte(TE_ARMOR_RICOCHET)
837
+ * write_coord(position.x)
838
+ * write_coord(position.y)
839
+ * write_coord(position.z)
840
+ * write_byte(scale in 0.1's)
841
+ */
842
+ #define TE_ARMOR_RICOCHET 111
843
+
844
+ /**
845
+ * TE_PLAYERDECAL
846
+ *
847
+ * @note
848
+ * write_byte(TE_PLAYERDECAL)
849
+ * write_byte(playerindex)
850
+ * write_coord(position.x)
851
+ * write_coord(position.y)
852
+ * write_coord(position.z)
853
+ * write_short(entity???)
854
+ * write_byte(decal number)
855
+ * [optional] write_short(model index)
856
+ */
857
+ #define TE_PLAYERDECAL 112
858
+
859
+ /**
860
+ * Create alpha sprites inside of box, float upwards
861
+ *
862
+ * @note
863
+ * write_byte(TE_BUBBLES)
864
+ * write_coord(position.x) (min start position)
865
+ * write_coord(position.y)
866
+ * write_coord(position.z)
867
+ * write_coord(position.x) (max start position)
868
+ * write_coord(position.y)
869
+ * write_coord(position.z)
870
+ * write_coord(float height)
871
+ * write_short(model index)
872
+ * write_byte(count)
873
+ * write_coord(speed)
874
+ */
875
+ #define TE_BUBBLES 113
876
+
877
+ /**
878
+ * Create alpha sprites along a line, float upwards
879
+ *
880
+ * @note
881
+ * write_byte(TE_BUBBLETRAIL)
882
+ * write_coord(position.x) (min start position)
883
+ * write_coord(position.y) (min start position)
884
+ * write_coord(position.z) (min start position)
885
+ * write_coord(position.x) (max start position)
886
+ * write_coord(position.y) (max start position)
887
+ * write_coord(position.z) (max start position)
888
+ * write_coord(float height)
889
+ * write_short(model index)
890
+ * write_byte(count)
891
+ * write_coord(speed)
892
+ */
893
+ #define TE_BUBBLETRAIL 114
894
+
895
+ /**
896
+ * Spray of opaque sprite1's that fall, single sprite2 for 1..2 secs (this is a high-priority tent)
897
+ *
898
+ * @note
899
+ * write_byte(TE_BLOODSPRITE)
900
+ * write_coord(position.x)
901
+ * write_coord(position.y)
902
+ * write_coord(position.z)
903
+ * write_short(sprite1 index)
904
+ * write_short(sprite2 index)
905
+ * write_byte(color)
906
+ * write_byte(scale)
907
+ */
908
+ #define TE_BLOODSPRITE 115
909
+
910
+ /**
911
+ * Decal applied to the world brush
912
+ *
913
+ * @note
914
+ * write_byte(TE_WORLDDECAL)
915
+ * write_coord(position.x) decal position (center of texture in world)
916
+ * write_coord(position.y)
917
+ * write_coord(position.z)
918
+ * write_byte(texture index of precached decal texture name)
919
+ */
920
+ #define TE_WORLDDECAL 116
921
+
922
+ /**
923
+ * Decal (with texture index > 256) applied to world brush
924
+ *
925
+ * @note
926
+ * write_byte(TE_WORLDDECALHIGH)
927
+ * write_coord(position.x) decal position (center of texture in world)
928
+ * write_coord(position.y)
929
+ * write_coord(position.z)
930
+ * write_byte(texture index of precached decal texture name - 256)
931
+ */
932
+ #define TE_WORLDDECALHIGH 117
933
+
934
+ /**
935
+ * Same as TE_DECAL, but the texture index was greater than 256
936
+ *
937
+ * @note
938
+ * write_byte(TE_DECALHIGH)
939
+ * write_coord(position.x) decal position (center of texture in world)
940
+ * write_coord(position.y)
941
+ * write_coord(position.z)
942
+ * write_byte(texture index of precached decal texture name - 256)
943
+ * write_short(entity index)
944
+ */
945
+ #define TE_DECALHIGH 118
946
+
947
+ /**
948
+ * Makes a projectile (like a nail) (this is a high-priority tent)
949
+ *
950
+ * @note
951
+ * write_byte(TE_PROJECTILE)
952
+ * write_coord(position.x)
953
+ * write_coord(position.y)
954
+ * write_coord(position.z)
955
+ * write_coord(velocity.x)
956
+ * write_coord(velocity.y)
957
+ * write_coord(velocity.z)
958
+ * write_short(modelindex)
959
+ * write_byte(life)
960
+ * write_byte(owner) projectile won't collide with owner (if owner == 0, projectile will hit any client).
961
+ */
962
+ #define TE_PROJECTILE 119
963
+
964
+ /**
965
+ * Throws a shower of sprites or models
966
+ *
967
+ * @note
968
+ * write_byte(TE_SPRAY)
969
+ * write_coord(position.x)
970
+ * write_coord(position.y)
971
+ * write_coord(position.z)
972
+ * write_coord(direction.x)
973
+ * write_coord(direction.y)
974
+ * write_coord(direction.z)
975
+ * write_short(modelindex)
976
+ * write_byte(count)
977
+ * write_byte(speed)
978
+ * write_byte(noise)
979
+ * write_byte(rendermode)
980
+ */
981
+ #define TE_SPRAY 120
982
+
983
+ /**
984
+ * Sprites emit from a player's bounding box (ONLY use for players!)
985
+ *
986
+ * @note
987
+ * write_byte(TE_PLAYERSPRITES)
988
+ * write_short(playernum)
989
+ * write_short(sprite modelindex)
990
+ * write_byte(count)
991
+ * write_byte(variance) (0 = no variance in size) (10 = 10% variance in size)
992
+ */
993
+ #define TE_PLAYERSPRITES 121
994
+
995
+ /**
996
+ * Very similar to lavasplash
997
+ *
998
+ * @note
999
+ * write_byte(TE_PARTICLEBURST)
1000
+ * write_coord(origin)
1001
+ * write_short(radius)
1002
+ * write_byte(particle color)
1003
+ * write_byte(duration * 10) (will be randomized a bit)
1004
+ */
1005
+ #define TE_PARTICLEBURST 122
1006
+
1007
+ /**
1008
+ * Makes a field of fire
1009
+ *
1010
+ * @note
1011
+ * write_byte(TE_FIREFIELD)
1012
+ * write_coord(origin)
1013
+ * write_short(radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
1014
+ * write_short(modelindex)
1015
+ * write_byte(count)
1016
+ * write_byte(flags)
1017
+ * write_byte(duration (in seconds) * 10) (will be randomized a bit)
1018
+ */
1019
+ #define TE_FIREFIELD 123
1020
+
1021
+ /**
1022
+ * Flags for the TE_FIREFIELD effect, controlling its performance and aesthetic
1023
+ * features
1024
+ */
1025
+ #define TEFIRE_FLAG_ALLFLOAT 1 // All sprites will drift upwards as they animate
1026
+ #define TEFIRE_FLAG_SOMEFLOAT 2 // Some of the sprites will drift upwards. (50% chance)
1027
+ #define TEFIRE_FLAG_LOOP 4 // If set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration.
1028
+ #define TEFIRE_FLAG_ALPHA 8 // If set, sprite is rendered alpha blended at 50% else, opaque
1029
+ #define TEFIRE_FLAG_PLANAR 16 // If set, all fire sprites have same initial Z instead of randomly filling a cube.
1030
+
1031
+ /**
1032
+ * Attaches a TENT to a player (this is a high-priority tent)
1033
+ *
1034
+ * @note
1035
+ * write_byte(TE_PLAYERATTACHMENT)
1036
+ * write_byte(entity index of player)
1037
+ * write_coord(vertical offset) (attachment origin.z = player origin.z + vertical offset)
1038
+ * write_short(model index)
1039
+ * write_short(life * 10 )
1040
+ */
1041
+ #define TE_PLAYERATTACHMENT 124
1042
+
1043
+ /**
1044
+ * Will expire all TENTS attached to a player.
1045
+ *
1046
+ * @note
1047
+ * write_byte(TE_KILLPLAYERATTACHMENTS)
1048
+ * write_byte(entity index of player)
1049
+ */
1050
+ #define TE_KILLPLAYERATTACHMENTS 125
1051
+
1052
+ /**
1053
+ * Much more compact shotgun message
1054
+ *
1055
+ * @note This message is used to make a client approximate a 'spray' of gunfire.
1056
+ * Any weapon that fires more than one bullet per frame and fires in a bit
1057
+ * of a spread is a good candidate for MULTIGUNSHOT use. (shotguns)
1058
+ * @note This effect makes the client do traces for each bullet, these client
1059
+ * traces ignore entities that have studio models.Traces are 4096 long.
1060
+ * @note
1061
+ * write_byte(TE_MULTIGUNSHOT)
1062
+ * write_coord(origin.x)
1063
+ * write_coord(origin.y)
1064
+ * write_coord(origin.z)
1065
+ * write_coord(direction.x)
1066
+ * write_coord(direction.y)
1067
+ * write_coord(direction.z)
1068
+ * write_coord(x noise * 100)
1069
+ * write_coord(y noise * 100)
1070
+ * write_byte(count)
1071
+ * write_byte(bullethole decal texture index)
1072
+ */
1073
+ #define TE_MULTIGUNSHOT 126
1074
+
1075
+
1076
+ /**
1077
+ * Larger message than the standard tracer, but allows some customization.
1078
+ *
1079
+ * @note
1080
+ * write_byte(TE_USERTRACER)
1081
+ * write_coord(origin.x)
1082
+ * write_coord(origin.y)
1083
+ * write_coord(origin.z)
1084
+ * write_coord(velocity.x)
1085
+ * write_coord(velocity.y)
1086
+ * write_coord(velocity.z)
1087
+ * write_byte(life * 10)
1088
+ * write_byte(color) this is an index into an array of color vectors in the engine. (0 - )
1089
+ * write_byte(length * 10)
1090
+ */
1091
+ #define TE_USERTRACER 127
1092
+
1093
+ /**
1094
+ * @endsection
1095
+ */
1096
+
1097
+ /**
1098
+ * From hltv.h from the HLSDK, these are used in conjunction with SVC_DIRECTOR
1099
+ * sub commands of svc_director
1100
+ */
1101
+ #define DRC_CMD_NONE 0 // NULL director command
1102
+ #define DRC_CMD_START 1 // start director mode
1103
+ #define DRC_CMD_EVENT 2 // informs about director command
1104
+ #define DRC_CMD_MODE 3 // switches camera modes
1105
+ #define DRC_CMD_CAMERA 4 // sets camera registers
1106
+ #define DRC_CMD_TIMESCALE 5 // sets time scale
1107
+ #define DRC_CMD_MESSAGE 6 // send HUD centerprint
1108
+ #define DRC_CMD_SOUND 7 // plays a particular sound
1109
+ #define DRC_CMD_STATUS 8 // status info about broadcast
1110
+ #define DRC_CMD_BANNER 9 // banner file name for HLTV gui
1111
+ #define DRC_CMD_FADE 10 // send screen fade command
1112
+ #define DRC_CMD_SHAKE 11 // send screen shake command
1113
+ #define DRC_CMD_STUFFTEXT 12 // like the normal svc_stufftext but as director command
1114
+
1115
+ #define DRC_CMD_LAST 12
1116
+
1117
+ /**
1118
+ * HLTV_EVENT event flags
1119
+ */
1120
+ #define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important)
1121
+ #define DRC_FLAG_SIDE (1<<4) //
1122
+ #define DRC_FLAG_DRAMATIC (1<<5) // is a dramatic scene
1123
+ #define DRC_FLAG_SLOWMOTION (1<<6) // would look good in SloMo
1124
+ #define DRC_FLAG_FACEPLAYER (1<<7) // player is doning something (reload/defuse bomb etc)
1125
+ #define DRC_FLAG_INTRO (1<<8) // is a introduction scene
1126
+ #define DRC_FLAG_FINAL (1<<9) // is a final scene
1127
+ #define DRC_FLAG_NO_RANDOM (1<<10) // don't randomize event data
1128
+
1129
+ #define MAX_DIRECTOR_CMD_PARAMETERS 4
1130
+ #define MAX_DIRECTOR_CMD_STRING 128