[Half-Life AMXX] / include / ham_const.inc Repository:
ViewVC logotype

Annotation of /include/ham_const.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17 - (view) (download)

1 : ian 17 #if defined _ham_const_included
2 :     #endinput
3 :     #endif
4 :     #define _ham_const_included
5 :    
6 :     /**
7 :     * Ham return types.
8 :     * -
9 :     * Return these from hooks to disable calling the target function.
10 :     * Numbers match up with fakemeta's FMRES_* for clarity. They are interchangable.
11 :     * 0 (or no return) is also interpretted as HAM_IGNORED.
12 :     */
13 :     #define HAM_IGNORED 1 /**< Calls target function, returns normal value */
14 :     #define HAM_HANDLED 2 /**< Tells the module you did something, still calls target function and returns normal value */
15 :     #define HAM_OVERRIDE 3 /**< Still calls the target function, but returns whatever is set with SetHamReturn*() */
16 :     #define HAM_SUPERCEDE 4 /**< Block the target call, and use your return value (if applicable) (Set with SetHamReturn*()) */
17 :    
18 :     /**
19 :     * A few notes about all of the following functions:
20 :     * - Not all functions will do as you expect on all mods.
21 :     * If a function does not do what you would believe it should
22 :     * DO NOT file a bug report, you will be ignored.
23 :     *
24 :     * - Passing invalid parameters has potential to crash the server
25 :     * So be careful, and adequately test!
26 :     *
27 :     * - All functions take (and pass) a "this" index as the first param.
28 :     * This is the entity from which the function is being executed on.
29 :     *
30 :     * - All functions and forwards (eg: {Register,Execute}Ham[B]) require
31 :     * the mod to have the pev and base keys in addition to the function
32 :     * keys for the corresponding mod/operating system in hamdata.ini
33 :     *
34 :     * - Some functions that return booleans may need to be logically ANDed
35 :     * to get the results desired. e.g: if (ExecuteHam(Ham_TS_IsObjective, this) & 0x0000FFFF != 0) { // true.. }
36 :     * because the module will return the full integer value.
37 :     */
38 :    
39 :     enum Ham
40 :     {
41 :     /**
42 :     * Description: This is typically called whenever an entity is created.
43 :     * It is the virtual equivilent of spawn from the engine.
44 :     * Some mods call this on player spawns too.
45 :     * Forward params: function(this)
46 :     * Return type: None.
47 :     * Execute params: ExecuteHam(Ham_Spawn, this);
48 :     */
49 :     Ham_Spawn = 0,
50 :    
51 :     /**
52 :     * Description: This is typically called on map change.
53 :     * This will typically precache all assets required by the entity.
54 :     * Forward params: function(this)
55 :     * Return type: None.
56 :     * Execute params: ExecuteHam(Ham_Precache, this);
57 :     */
58 :     Ham_Precache,
59 :    
60 :     /**
61 :     * Description: Typically this is similar to an engine keyvalue call.
62 :     * Use the kvd natives from fakemeta to handle the kvd_handle passed.
63 :     * NOTE: Do not pass handle 0 to this! Use get_kvd_handle(0) from fakemeta instead!
64 :     * Forward params: function(this, kvd_handle);
65 :     * Return type: None.
66 :     * Execute params: ExecuteHam(Ham_Keyvalue, this, kvd_handle);
67 :     */
68 :     Ham_Keyvalue,
69 :    
70 :     /**
71 :     * Description: Returns flags for how an entity can be used (FCAP_* constants in hlsdk_const.inc)
72 :     * Forward params: function(this)
73 :     * Return type: Integer.
74 :     * Execute params: ExecuteHam(Ham_ObjectCaps, this);
75 :     */
76 :     Ham_ObjectCaps,
77 :    
78 :     /**
79 :     * Description: Usually called to activate some objects.
80 :     * Forward params: function(this)
81 :     * Return type: None.
82 :     * Execute params: ExecuteHam(Ham_Activate, this);
83 :     */
84 :     Ham_Activate,
85 :    
86 :     /**
87 :     * Description: Usually called after the engine call with the same name.
88 :     * Forward params: function(this)
89 :     * Return type: None.
90 :     * Execute params: ExecuteHam(Ham_SetObjectCollisionBox, this);
91 :     */
92 :     Ham_SetObjectCollisionBox,
93 :    
94 :     /**
95 :     * Description: Returns an integer number that corresponds with what type of entity this is.
96 :     * Forward params: function(this)
97 :     * Return type: Integer.
98 :     * Execute params: ExecuteHam(Ham_Classify, this);
99 :     */
100 :     Ham_Classify,
101 :    
102 :     /**
103 :     * Description: Typically called when an entity dies to notify any children entities about the death.
104 :     * Forward params: function(this, idchild)
105 :     * Return type: None.
106 :     * Execute params: ExecuteHam(Ham_DeathNotice, this, idchild)
107 :     */
108 :     Ham_DeathNotice,
109 :    
110 :     /**
111 :     * Description: Usually called whenever an entity gets attacked by a hitscan (such as a gun) weapon.
112 :     * Use the get/set tr2 natives in fakemeta to handle the traceresult data.
113 :     * Do not use a handle of 0 as a traceresult in execution, use create_tr2() from Fakemeta
114 :     * to pass a custom handle instead. (Don't forget to free the handle when you're done.)
115 :     * Forward params: function(this, idattacker, Float:damage, Float:direction[3], traceresult, damagebits)
116 :     * Return type: None.
117 :     * Execute params: ExecuteHam(Ham_TraceAttack, this, idattacker, Float:damage, Float:direction[3], tracehandle, damagebits);
118 :     */
119 :     Ham_TraceAttack,
120 :    
121 :     /**
122 :     * Description: Usually called whenever an entity takes any kind of damage.
123 :     * Inflictor is the entity that caused the damage (such as a gun).
124 :     * Attacker is the entity that tirggered the damage (such as the gun's owner).
125 :     * Forward params: function(this, idinflictor, idattacker, Float:damage, damagebits);
126 :     * Return type: Integer.
127 :     * Execute params: ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits);
128 :     */
129 :     Ham_TakeDamage,
130 :    
131 :     /**
132 :     * Description: Usually called whenever an entity gets a form of a heal.
133 :     * Forward params: function(this, Float:health, damagebits);
134 :     * Return type: Integer.
135 :     * Execute params: ExecuteHam(Ham_TakeHealth, this, Float:health, damagebits);
136 :     */
137 :     Ham_TakeHealth,
138 :    
139 :     /**
140 :     * Description: Normally called whenever an entity dies.
141 :     * Forward params: function(this, idattacker, shouldgib)
142 :     * Return type: None.
143 :     * Execute params: ExecuteHam(Ham_Killed, this, idattacker, shouldgib);
144 :     */
145 :     Ham_Killed,
146 :    
147 :     /**
148 :     * Description: Normally returns the blood color of the entity.
149 :     * Forward params: function(this)
150 :     * Return type: Integer.
151 :     * Execute params: ExecuteHam(Ham_BloodColor, this)
152 :     */
153 :     Ham_BloodColor,
154 :    
155 :     /**
156 :     * Description: Traces where blood should appear.
157 :     * Forward params: function(this, Float:Damage, Float:Direction[3], trace_handle, damagebits);
158 :     * Return type: None.
159 :     * Execute params: ExecuteHam(Ham_TraceBleed, this, Float:damage, Float:direction[3], trace_handle, damagebits);
160 :     */
161 :     Ham_TraceBleed,
162 :    
163 :     /**
164 :     * Description: Returns whether an entity is activated.
165 :     * Forward params: function(this, idActivator);
166 :     * Return type: Integer.
167 :     * Execute params: ExecuteHam(Ham_IsTriggered, this, idActivator);
168 :     */
169 :     Ham_IsTriggered,
170 :    
171 :     /**
172 :     * Description: Returns the id of the entity if its class is derived off of CBaseMonster, -1 otherwise.
173 :     * Forward params: function(this)
174 :     * Return type: Entity.
175 :     * Execute params: ExecuteHam(Ham_MyMonsterPointer, this);
176 :     */
177 :     Ham_MyMonsterPointer,
178 :    
179 :     /**
180 :     * Description: Returns the id of the entity if its class is derived off of CBaseSquadMonster, -1 otherwise.
181 :     * Forward params: function(this)
182 :     * Return type: Entity.
183 :     * Execute params: ExecuteHam(Ham_MySquadMonsterPointer, this);
184 :     */
185 :     Ham_MySquadMonsterPointer,
186 :    
187 :     /**
188 :     * Description: Returns the toggle state of the entity.
189 :     * Forward params: function(this)
190 :     * Return type: Integer.
191 :     * Execute params: ExecuteHam(Ham_GetToggleState, this);
192 :     */
193 :     Ham_GetToggleState,
194 :    
195 :     /**
196 :     * Description: Typically adds points to the entity.
197 :     * Forward params: function(this, points, bool:cangonegative);
198 :     * Return type: None.
199 :     * Execute params: ExecuteHam(Ham_AddPoints, this, points, bool:cangonegative);
200 :     */
201 :     Ham_AddPoints,
202 :    
203 :     /**
204 :     * Description: Typically adds points to everybody on the entity's team.
205 :     * Forward params: function(this, points, bool:cangonegative);
206 :     * Return type: None.
207 :     * Execute params: ExecuteHam(Ham_AddPointsToTeam, this, points, bool:cangonegative);
208 :     */
209 :     Ham_AddPointsToTeam,
210 :    
211 :     /**
212 :     * Description: Adds an item to the player's inventory.
213 :     * Forward params: function(this, idother);
214 :     * Return type: Integer.
215 :     * Execute params: ExecuteHam(Ham_AddPlayerItem, this, idother);
216 :     */
217 :     Ham_AddPlayerItem,
218 :    
219 :     /**
220 :     * Description: Removes an item to the player's inventory.
221 :     * Forward params: function(this, idother);
222 :     * Return type: Integer.
223 :     * Execute params: ExecuteHam(Ham_RemovePlayerItem, this, idother);
224 :     */
225 :     Ham_RemovePlayerItem,
226 :    
227 :     /**
228 :     * Description: Gives ammo to the entity.
229 :     * Forward params: function(this, Amount, const Name[], Max)
230 :     * Return type: Integer.
231 :     * Execute params: ExecuteHam(Ham_GiveAmmo, this, amount, "type", max);
232 :     */
233 :     Ham_GiveAmmo,
234 :    
235 :     /**
236 :     * Description: Unsure, I believe this is the delay between activation for an entity.
237 :     * Forward params: function(this)
238 :     * Return type: Float.
239 :     * Execute params: ExecuteHam(Ham_GetDelay, this, Float:output)
240 :     */
241 :     Ham_GetDelay,
242 :    
243 :     /**
244 :     * Description: Whether or not the entity is moving.
245 :     * Forward params: function(this);
246 :     * Return type: Integer.
247 :     * Execute params: ExecuteHam(Ham_IsMoving, this);
248 :     */
249 :     Ham_IsMoving,
250 :    
251 :     /**
252 :     * Description: Unsure.
253 :     * Forward params: function(this)
254 :     * Return type: None.
255 :     * Execute params: ExecuteHam(Ham_OverrideReset, this)
256 :     */
257 :     Ham_OverrideReset,
258 :    
259 :     /**
260 :     * Description: Returns the damage decal of the entity for the damage type.
261 :     * Forward params: function(this, damagebits)
262 :     * Return type: Integer.
263 :     * Execute params: ExecuteHam(Ham_DamageDecal, this);
264 :     */
265 :     Ham_DamageDecal,
266 :    
267 :     /**
268 :     * Description: Sets the toggle state of the entity.
269 :     * Forward params: function(this, state)
270 :     * Return type: None.
271 :     * Execute params: ExecuteHam(Ham_SetToggleState, this, state);
272 :     */
273 :     Ham_SetToggleState,
274 :    
275 :     /**
276 :     * Description: Not entirely sure what this does.
277 :     * Forward params: function(this)
278 :     * Return type: None.
279 :     * Execute params: ExecuteHam(Ham_StartSneaking, this);
280 :     */
281 :     Ham_StartSneaking,
282 :    
283 :     /**
284 :     * Description: Not entirely sure what this does.
285 :     * Forward params: function(this)
286 :     * Return type: None.
287 :     * Execute params: ExecuteHam(Ham_StopSneaking, this);
288 :     */
289 :     Ham_StopSneaking,
290 :    
291 :     /**
292 :     * Description: Not entirely sure.
293 :     * Forward params: function(this, idOn)
294 :     * Return type: Integer (boolean).
295 :     * Execute params: ExecuteHam(Ham_OnControls, this, idOn);
296 :     */
297 :     Ham_OnControls,
298 :    
299 :     /**
300 :     * Description: Whether or not the entity is sneaking.
301 :     * Forward params: function(this);
302 :     * Return type: Integer (boolean).
303 :     * Execute params: ExecuteHam(Ham_IsSneaking, this);
304 :     */
305 :     Ham_IsSneaking,
306 :    
307 :     /**
308 :     * Description: Whether or not the entity is alive.
309 :     * Forward params: function(this);
310 :     * Return type: Integer (boolean).
311 :     * Execute params: ExecuteHam(Ham_IsAlive, this);
312 :     */
313 :     Ham_IsAlive,
314 :    
315 :     /**
316 :     * Description: Whether or not the entity uses a BSP model.
317 :     * Forward params: function(this);
318 :     * Return type: Integer (boolean).
319 :     * Execute params: ExecuteHam(Ham_IsBSPModel, this);
320 :     */
321 :     Ham_IsBSPModel,
322 :    
323 :     /**
324 :     * Description: Whether or not the entity can reflect gauss shots..
325 :     * Forward params: function(this);
326 :     * Return type: Integer (boolean).
327 :     * Execute params: ExecuteHam(Ham_ReflectGauss, this);
328 :     */
329 :     Ham_ReflectGauss,
330 :    
331 :     /**
332 :     * Description: Whether or not the target is the same as the one passed.
333 :     * Note the strindex parameter is a string passed that has been allocated by the engine.
334 :     * Use fakemeta's EngFunc_SzFromIndex to convert to a normal string, or fakemeta's
335 :     * EngFunc_AllocString to create a new string.
336 :     * Forward params: function(this, strindex).
337 :     * Return type: Integer (boolean).
338 :     * Execute params: ExecuteHam(Ham_HasTarget, this, strindex);
339 :     */
340 :     Ham_HasTarget,
341 :    
342 :     /**
343 :     * Description: Whether or not the entity is in the world.
344 :     * Forward params: function(this);
345 :     * Return type: Integer (boolean).
346 :     * Execute params: ExecuteHam(Ham_IsInWorld, this);
347 :     */
348 :     Ham_IsInWorld,
349 :    
350 :     /**
351 :     * Description: Whether or not the entity is a player.
352 :     * Forward params: function(this);
353 :     * Return type: Integer (boolean).
354 :     * Execute params: ExecuteHam(Ham_IsPlayer, this);
355 :     */
356 :     Ham_IsPlayer,
357 :    
358 :     /**
359 :     * Description: Whether or not the entity is a net client.
360 :     * Forward params: function(this);
361 :     * Return type: Integer (boolean).
362 :     * Execute params: ExecuteHam(Ham_IsNetClient, this);
363 :     */
364 :     Ham_IsNetClient,
365 :    
366 :     /**
367 :     * Description: Get the entity's team id.
368 :     * Forward params: function(this);
369 :     * Return type: String (string length returned and string byref'd in ExecuteHam).
370 :     * Execute params: ExecuteHam(Ham_TeamId, this, buffer[], size);
371 :     */
372 :     Ham_TeamId,
373 :    
374 :     /**
375 :     * Description: Returns the next target of this.
376 :     * Forward params: function(this);
377 :     * Return type: Entity.
378 :     * Execute params: ExecuteHam(Ham_GetNextTarget, this);
379 :     */
380 :     Ham_GetNextTarget,
381 :    
382 :     /**
383 :     * Description: Called whenever an entity thinks.
384 :     * Forward params: function(this)
385 :     * Return type: None.
386 :     * Execute params: ExecuteHam(Ham_Think, this);
387 :     */
388 :     Ham_Think,
389 :    
390 :     /**
391 :     * Description: Called whenever two entities touch.
392 :     * Forward params: function(this, idother);
393 :     * Return type: None.
394 :     * Execute params: ExecuteHam(Ham_Touch, this, idother);
395 :     */
396 :     Ham_Touch,
397 :    
398 :     /**
399 :     * Description: Called whenver one entity uses another.
400 :     * Forward params: function(this, idcaller, idactivator, use_type, Float:value)
401 :     * Return type: None.
402 :     * Execute params: ExecuteHam(Ham_Use, this, idcaller, idactivator, use_type, Float:value);
403 :     */
404 :     Ham_Use,
405 :    
406 :     /**
407 :     * Description: Normally called whenever one entity blocks another from moving.
408 :     * Forward params: function(this, idother);
409 :     * Return type: None.
410 :     * Execute params: ExecuteHam(Ham_Blocked, this, idother);
411 :     */
412 :     Ham_Blocked,
413 :    
414 :     /**
415 :     * Description: Normally called when a map-based item respawns, such as a health kit or something.
416 :     * Forward params: function(this);
417 :     * Return type: Entity.
418 :     * Execute params: ExecuteHam(Ham_Respawn, this);
419 :     */
420 :     Ham_Respawn,
421 :    
422 :     /**
423 :     * Description: Used in Half-Life to update a monster's owner.
424 :     * Forward params: function(this);
425 :     * Return type: None.
426 :     * Execute params: ExecuteHam(Ham_UpdateOwner, this);
427 :     */
428 :     Ham_UpdateOwner,
429 :    
430 :     /**
431 :     * Description: Normally called whenever a barnacle grabs the entity.
432 :     * Forward params: function(this);
433 :     * Return type: Integer.
434 :     * Execute params: ExecuteHam(Ham_FBecomeProne, this);
435 :     */
436 :     Ham_FBecomeProne,
437 :    
438 :     /**
439 :     * Description: Returns the center of the entity.
440 :     * Forward params: function(this);
441 :     * Return type: Vector (byref'd in Execute).
442 :     * Execute params: ExecuteHam(Ham_Center, this, Float:output[3]);
443 :     */
444 :     Ham_Center,
445 :    
446 :     /**
447 :     * Description: Returns the eye position of the entity.
448 :     * Forward params: function(this);
449 :     * Return type: Vector (byref'd in Execute).
450 :     * Execute params: ExecuteHam(Ham_EyePosition, this, Float:output[3]);
451 :     */
452 :     Ham_EyePosition,
453 :    
454 :     /**
455 :     * Description: Returns the ear position of the entity.
456 :     * Forward params: function(this);
457 :     * Return type: Vector (byref'd in Execute).
458 :     * Execute params: ExecuteHam(Ham_EarPosition, this, Float:output[3]);
459 :     */
460 :     Ham_EarPosition,
461 :    
462 :     /**
463 :     * Description: Position to shoot at.
464 :     * Forward params: function(this, Float:srcvector[3]);
465 :     * Return type: Vector (byref'd in Execute).
466 :     * Execute params: ExecuteHam(Ham_BodyTarget, Float:srcvector[3], Float:returnvector[3])
467 :     */
468 :     Ham_BodyTarget,
469 :    
470 :     /**
471 :     * Description: Returns the illumination of the entity.
472 :     * Forward params: function(this)
473 :     * Return type: Integer.
474 :     * Execute params: ExecuteHam(Ham_Illumination, this);
475 :     */
476 :     Ham_Illumination,
477 :    
478 :     /**
479 :     * Description: Unsure, I assume it is whether or not the other entity is visible to this entity.
480 :     * Forward params: function(this, idOther);
481 :     * Return type: Integer (boolean).
482 :     * Execute params: ExecuteHam(Ham_FVisible, this, idOther);
483 :     */
484 :     Ham_FVisible,
485 :    
486 :     /**
487 :     * Description: Unsure, I assume it is whether or not the target vector is visible to this entity.
488 :     * Forward params: function(this, const Float:origin[3]);
489 :     * Return type: Integer (boolean).
490 :     * Execute params: ExecuteHam(Ham_FVecVisible, this, const Float:origin[3]);
491 :     */
492 :     Ham_FVecVisible,
493 :    
494 :    
495 :     /**
496 :     * Players have all the attributes of normal entities, in addition to these.
497 :     */
498 :    
499 :     /**
500 :     * Description: Typically called every frame when a player has jump held.
501 :     * Forward params: function(this)
502 :     * Return type: None.
503 :     * Execute params: ExecuteHam(Ham_Player_Jump, this);
504 :     */
505 :     Ham_Player_Jump,
506 :    
507 :     /**
508 :     * Description: Typically called every frame when a player has duck held.
509 :     * Forward params: function(this)
510 :     * Return type: None.
511 :     * Execute params: ExecuteHam(Ham_Player_Duck, this);
512 :     */
513 :     Ham_Player_Duck,
514 :    
515 :     /**
516 :     * Description: Typically called every frame during PlayerPreThink engine call.
517 :     * Forward params: function(this)
518 :     * Return type: None.
519 :     * Execute params: ExecuteHam(Ham_Player_PreThink, this);
520 :     */
521 :     Ham_Player_PreThink,
522 :    
523 :     /**
524 :     * Description: Typically called every frame during PlayerPostThink engine call.
525 :     * Forward params: function(this)
526 :     * Return type: None.
527 :     * Execute params: ExecuteHam(Ham_Player_PostThink, this);
528 :     */
529 :     Ham_Player_PostThink,
530 :    
531 :     /**
532 :     * Description: Returns a vector that tells the gun position.
533 :     * Forward params: function(this)
534 :     * Return type: Vector, byreffed in execute.
535 :     * Execute params: ExecuteHam(Ham_Player_GetGunPosition, this, Float:output[3]);
536 :     */
537 :     Ham_Player_GetGunPosition,
538 :    
539 :     /**
540 :     * Description: Whether or not the player should fade on death.
541 :     * Forward param: function(this)
542 :     * Return type: Integer (boolean).
543 :     * Execute params: ExecuteHam(Ham_Player_ShouldFadeOnDeath, this);
544 :     */
545 :     Ham_Player_ShouldFadeOnDeath,
546 :    
547 :     /**
548 :     * Description: Called whenever an impulse command is executed.
549 :     * Forward param: function(this)
550 :     * Return type: None.
551 :     * Execute params: ExecuteHam(Ham_Player_ImpulseComands, this);
552 :     */
553 :     Ham_Player_ImpulseCommands,
554 :    
555 :     /**
556 :     * Description: Updates the client's data for hud changes (such as ammo). Usually called every frame.
557 :     * Forward param: function(this)
558 :     * Return type: None.
559 :     * Execute params: ExecuteHam(Ham_Player_UpdateClientData, this);
560 :     */
561 :     Ham_Player_UpdateClientData,
562 :    
563 :     /**
564 :     * Items have all the attributes of normal entities in addition to these.
565 :     */
566 :    
567 :     /**
568 :     * Description: Adds the item to the player.
569 :     * Forward params: function(this, idPlayer);
570 :     * Return type: Integer (boolean).
571 :     * Execute params: ExecuteHam(Ham_Item_AddToPlayer, this, idPlayer);
572 :     */
573 :     Ham_Item_AddToPlayer,
574 :    
575 :     /**
576 :     * Description: Unsure.
577 :     * Forward params: function(this, idOriginal);
578 :     * Return type: Integer (boolean).
579 :     * Execute params: ExecuteHam(Ham_Item_AddDuplicate, this, idOriginal);
580 :     */
581 :     Ham_Item_AddDuplicate,
582 :    
583 :     /**
584 :     * Description: Whether or not this entity can be deployed.
585 :     * Forward params: function(this);
586 :     * Return type: Integer (boolean).
587 :     * Execute params: ExecuteHam(Ham_Item_CanDeploy, this);
588 :     */
589 :     Ham_Item_CanDeploy,
590 :    
591 :     /**
592 :     * Description: Deploys the entity (usually a weapon).
593 :     * Forward params: function(this);
594 :     * Return type: Integer (boolean).
595 :     * Execute params: ExecuteHam(Ham_Item_Deploy, this);
596 :     */
597 :     Ham_Item_Deploy,
598 :    
599 :     /**
600 :     * Description: Whether or not the entity can be holstered.
601 :     * Forward params: function(this);
602 :     * Return type: Integer (boolean).
603 :     * Execute params: ExecuteHam(Ham_Item_CanHolster, this);
604 :     */
605 :     Ham_Item_CanHolster,
606 :    
607 :     /**
608 :     * Description: Whether or not the entity (usually weapon) can be holstered.
609 :     * Forward params: function(this)
610 :     * Return type: Integer (boolean).
611 :     * Execute params: ExecuteHam(Ham_Item_Holster, this);
612 :     */
613 :     Ham_Item_Holster,
614 :    
615 :     /**
616 :     * Description: Updates the HUD info about this item.
617 :     * Forward params: function(this);
618 :     * Return type: None.
619 :     * Execute params: ExecuteHam(Ham_UpdateItemInfo, this);
620 :     */
621 :     Ham_Item_UpdateItemInfo,
622 :    
623 :     /**
624 :     * Description: Called each frame for an item, normally only on active items.
625 :     * Forward params: function(this)
626 :     * Return type: None.
627 :     * Execute params: ExecuteHam(Ham_Item_PreFrame, this);
628 :     */
629 :     Ham_Item_PreFrame,
630 :    
631 :     /**
632 :     * Description: Called each frame for an item, normally only on active items.
633 :     * Forward params: function(this)
634 :     * Return type: None.
635 :     * Execute params: ExecuteHam(Ham_Item_PostFrame, this);
636 :     */
637 :     Ham_Item_PostFrame,
638 :    
639 :     /**
640 :     * Description: Called when an item gets dropped, normally on death only.
641 :     * Forward params: function(this)
642 :     * Return type: None.
643 :     * Execute params: ExecuteHam(Ham_Item_Drop, this);
644 :     */
645 :     Ham_Item_Drop,
646 :    
647 :     /**
648 :     * Description: Normally called when an item gets deleted.
649 :     * Forward params: function(this)
650 :     * Return type: None.
651 :     * Execute params: ExecuteHam(Ham_Item_Drop, this);
652 :     */
653 :     Ham_Item_Kill,
654 :    
655 :     /**
656 :     * Description: Called when an entity starts being attached to (normally invisible and "following") a player.
657 :     * Forward params: function(this, idPlayer)
658 :     * Return type: None.
659 :     * Execute params: ExecuteHam(Ham_Item_AttachToPlayer, this, idPlayer)
660 :     */
661 :     Ham_Item_AttachToPlayer,
662 :    
663 :     /**
664 :     * Description: Returns the ammo index of the item.
665 :     * Forward params: function(this)
666 :     * Return type: Integer.
667 :     * Execute params: ExecuteHam(Ham_Item_PrimaryAmmoIndex, this);
668 :     */
669 :     Ham_Item_PrimaryAmmoIndex,
670 :    
671 :     /**
672 :     * Description: Returns the secondary ammo index of the item.
673 :     * Forward params: function(this)
674 :     * Return type: Integer.
675 :     * Execute params: ExecuteHam(Ham_Item_SecondaryAmmoIndex, this);
676 :     */
677 :     Ham_Item_SecondaryAmmoIndex,
678 :    
679 :     /**
680 :     * Description: Updates item data for the client.
681 :     * Forward params: function(this, idPlayer)
682 :     * Return type: Integer.
683 :     * Execute params: ExecuteHam(Ham_Item_UpdateClientData, this, idPlayer);
684 :     */
685 :     Ham_Item_UpdateClientData,
686 :    
687 :     /**
688 :     * Description: Returns the entity index if the item is a weapon, -1 otherwise.
689 :     * Forward params: function(this)
690 :     * Return type: Entity.
691 :     * Execute Params: ExecuteHam(Ham_Item_GetWeaponPtr, this)
692 :     */
693 :     Ham_Item_GetWeaponPtr,
694 :    
695 :     /**
696 :     * Description: Returns the item slot for the item.
697 :     * Forward params: function(this)
698 :     * Return type: Integer.
699 :     * Execute Params: ExecuteHam(Ham_Item_ItemSlot, this)
700 :     */
701 :     Ham_Item_ItemSlot,
702 :    
703 :    
704 :     /**
705 :     * Weapons have all the attributes to Ham_Item_*, in addition to these.
706 :     */
707 :    
708 :     /**
709 :     * Description: Gets ammo from the target weapon.
710 :     * Forward params: function(this, idTarget)
711 :     * Return type: Integer.
712 :     * Execute Params: ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget)
713 :     */
714 :     Ham_Weapon_ExtractAmmo,
715 :    
716 :     /**
717 :     * Description: Gets clip ammo from the target weapon.
718 :     * Forward params: function(this, idTarget)
719 :     * Return type: Integer.
720 :     * Execute Params: ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget)
721 :     */
722 :     Ham_Weapon_ExtractClipAmmo,
723 :    
724 :     /**
725 :     * Description: Unsure.
726 :     * Forward params: function(this)
727 :     * Return type: Integer (boolean).
728 :     * Execute params: ExecuteHam(Ham_Weapon_AddWeapon, this);
729 :     */
730 :     Ham_Weapon_AddWeapon,
731 :    
732 :     /**
733 :     * Description: Plays the weapon's empty sound.
734 :     * Forward params: function(this)
735 :     * Return type: Integer (boolean).
736 :     * Execute params: ExecuteHam(Ham_Weapon_PlayEmptySound, this);
737 :     */
738 :     Ham_Weapon_PlayEmptySound,
739 :    
740 :     /**
741 :     * Description: Sets the weapon so that it can play empty sound again.
742 :     * Forward params: function(this)
743 :     * Return type: None.
744 :     * Execute params: ExecuteHam(Ham_Weapon_ResetEmptySound, this);
745 :     */
746 :     Ham_Weapon_ResetEmptySound,
747 :    
748 :     /**
749 :     * Description: Sends an animation event for the weapon.
750 :     * Forward params: function(this, iAnim, skiplocal, body);
751 :     * Return type: None.
752 :     * Execute params: ExecuteHam(Ham_Weapon_SendWeaponAnim, this, iAnim, skiplocal, body);
753 :     */
754 :     Ham_Weapon_SendWeaponAnim,
755 :    
756 :     /**
757 :     * Description: Whether or not the weapon is usable (has ammo, etc.)
758 :     * Forward params: function(this)
759 :     * Return type: Integer (boolean).
760 :     * Execute params: ExecuteHam(Ham_Weapon_IsUsable, this)
761 :     */
762 :     Ham_Weapon_IsUsable,
763 :    
764 :     /**
765 :     * Description: Called when the main attack of a weapon is triggered.
766 :     * Forward params: function(this)
767 :     * Return type: None.
768 :     * Execute params: ExecuteHam(Ham_Weapon_PrimaryAttack, this);
769 :     */
770 :     Ham_Weapon_PrimaryAttack,
771 :    
772 :     /**
773 :     * Description: Called when the secondary attack of a weapon is triggered.
774 :     * Forward params: function(this)
775 :     * Return type: None.
776 :     * Execute params: ExecuteHam(Ham_Weapon_SecondaryAttack, this);
777 :     */
778 :     Ham_Weapon_SecondaryAttack,
779 :    
780 :     /**
781 :     * Description: Called when the weapon is reloaded.
782 :     * Forward params: function(this)
783 :     * Return type: None.
784 :     * Execute params: ExecuteHam(Ham_Weapon_Reload, this);
785 :     */
786 :     Ham_Weapon_Reload,
787 :    
788 :     /**
789 :     * Description: Displays the idle animation for the weapon.
790 :     * Forward params: function(this)
791 :     * Return type: None.
792 :     * Execute params: ExecuteHam(Ham_Weapon_WeaponIdle, this);
793 :     */
794 :     Ham_Weapon_WeaponIdle,
795 :    
796 :     /**
797 :     * Description: There is no more ammo for this gun, so switch to the next best one.
798 :     * Forward params: function(this)
799 :     * Return type: None.
800 :     * ExecuteParams: ExecuteHam(Ham_Weapon_RetireWeapon, this)
801 :     */
802 :     Ham_Weapon_RetireWeapon,
803 :    
804 :     /**
805 :     * Description: Whether or not the weapon should idle.
806 :     * Forward params: function(this)
807 :     * Return type: Integer (boolean).
808 :     * Execute Params: ExecuteHam(Ham_Weapon_ShouldWeaponIdle, this)
809 :     */
810 :     Ham_Weapon_ShouldWeaponIdle,
811 :    
812 :     /**
813 :     * Description: Not sure.
814 :     * Forward params: function(this)
815 :     * Return type: Integer (boolean).
816 :     * Execute params: ExecuteHam(Ham_Weapon_UseDecrement, this);
817 :     */
818 :     Ham_Weapon_UseDecrement,
819 :    
820 :     /**
821 :     * Description: -
822 :     * Forward params: function(this, someboolvalue)
823 :     * Return type: None.
824 :     * Execute params: ExecuteHam(Ham_TS_BreakableRespawn, this, someboolvalue);
825 :     */
826 :     Ham_TS_BreakableRespawn,
827 :    
828 :     /**
829 :     * Description: -
830 :     * Forward params: function(this)
831 :     * Return type: Integer (boolean)
832 :     * Execute params: ExecuteHam(Ham_TS_CanUsedThroughWalls, this);
833 :     */
834 :     Ham_TS_CanUsedThroughWalls,
835 :    
836 :     /**
837 :     * Description: Unsure - this was removed in TS 3.0 (and thus is deprecated).
838 :     * Forward params: function(this)
839 :     * Return type: Integer (I think...)
840 :     * Execute params: ExecuteHam(Ham_TS_RespawnWait, this);
841 :     */
842 :     Ham_TS_RespawnWait,
843 :    
844 :     /**
845 :     * Description: This is called on a map reset for most map based entities.
846 :     * Forward params: function(this);
847 :     * Return type: None.
848 :     * Execute params: ExecuteHam(Ham_CS_Restart, this);
849 :     */
850 :     Ham_CS_Restart,
851 :    
852 :     /**
853 :     * Description: Respawn function for players/bots only! Do not use this on non player/bot entities!
854 :     * Forward params: function(this);
855 :     * Return type: None.
856 :     * Execute params: ExecuteHam(Ham_CS_RoundRespawn, this);
857 :     */
858 :     Ham_CS_RoundRespawn,
859 :     /**
860 :     * Description: Whether or not the player can drop the specified item.
861 :     * Forward params: function(this)
862 :     * Return type: Integer
863 :     * Execute params: ExecuteHam(Ham_CS_Item_CanDrop, this);
864 :     */
865 :     Ham_CS_Item_CanDrop,
866 :    
867 :     /**
868 :     * Description: Gets the maximum speed for whenever a player has the item deployed.
869 :     * Forward params: function(this);
870 :     * Return type: Float, byrefed in execute.
871 :     * Execute params: ExecuteHam(Ham_CS_Item_GetMaxSpeed, this, Float:output);
872 :     */
873 :     Ham_CS_Item_GetMaxSpeed,
874 :    
875 :     /**
876 :     * Description: I assume this spawns players at the start of a new round.
877 :     * Forward params: function(this)
878 :     * Return type: None.
879 :     * Execute Params: ExecuteHam(Ham_DOD_RoundRespawn, this);
880 :     */
881 :     Ham_DOD_RoundRespawn,
882 :    
883 :     /**
884 :     * Description: I assume this spawns entities (like func_breakables) at the start of a new round.
885 :     * Forward params: function(this)
886 :     * Return type: None.
887 :     * Execute Params: ExecuteHam(Ham_DOD_RoundRespawn, this);
888 :     */
889 :     Ham_DOD_RoundRespawnEnt,
890 :    
891 :     /**
892 :     * Description: Unsure.
893 :     * Forward params: function(this)
894 :     * Return type: None, I think...
895 :     * Execute params: ExecuteHam(Ham_DOD_RoundStore, this);
896 :     */
897 :     Ham_DOD_RoundStore,
898 :    
899 :     /**
900 :     * Description: Unsure.
901 :     * Forward params: function(this, someintegervalue)
902 :     * Return type: None.
903 :     * Execute params: ExecuteHam(Ham_DOD_AreaSetIndex, this, someintegervalue)
904 :     */
905 :     Ham_DOD_AreaSetIndex,
906 :    
907 :     /**
908 :     * Description: Unsure
909 :     * Forward params: function(this, idPlayer)
910 :     * Return type: None.
911 :     * Execute Params: ExecuteHam(Ham_DOD_AreaSendStatus, this, idPlayer);
912 :     */
913 :     Ham_DOD_AreaSendStatus,
914 :    
915 :     /**
916 :     * Description: Unsure.
917 :     * Forward params: function(this)
918 :     * Return type: Integer.
919 :     * Execute Params: ExecuteHam(Ham_DOD_GetState, this);
920 :     */
921 :     Ham_DOD_GetState,
922 :    
923 :     /**
924 :     * Description: Unsure.
925 :     * Forward params: function(this, idtarget)
926 :     * Return type: Integer.
927 :     * Execute Params: ExecuteHam(Ham_DOD_GetStateEnt, this, idtarget);
928 :     */
929 :     Ham_DOD_GetStateEnt,
930 :    
931 :     /**
932 :     * Description: Whether or not a player can drop this item.
933 :     * Forward params: function(this)
934 :     * Return type: Integer (boolean).
935 :     * Execute Params: ExecuteHam(Ham_DOD_Item_CanDrop, this);
936 :     */
937 :     Ham_DOD_Item_CanDrop,
938 :    
939 :     /**
940 :     * Description: Unsure.
941 :     * Forward params: function(this, iduser)
942 :     * Return type: Integer.
943 :     * Execute params: ExecuteHam(Ham_TFC_EngineerUse, this, iduser)
944 :     */
945 :     Ham_TFC_EngineerUse,
946 :    
947 :     /**
948 :     * Description: Unsure.
949 :     * Forward params: function(this)
950 :     * Return type: None.
951 :     * Execute params: ExecuteHam(Ham_TFC_Finished, this);
952 :     */
953 :     Ham_TFC_Finished,
954 :    
955 :     /**
956 :     * Description: Unsure.
957 :     * Forward params: function(this, entityid, Float:floata, Float:floatb)
958 :     * Return type: None.
959 :     * Execute params: ExecuteHam(Ham_TFC_EmpExplode, this, entityid, Float:floata, Float:floatb)
960 :     */
961 :     Ham_TFC_EmpExplode,
962 :    
963 :     /**
964 :     * Description: Unsure.
965 :     * Forward params: function(this, Float:floata, Float:floatb)
966 :     * Return type: None.
967 :     * Execute params: ExecuteHam(Ham_TFC_CalcEmpDmgRad, this, Float:floata, Float:floatb)
968 :     */
969 :     Ham_TFC_CalcEmpDmgRad,
970 :    
971 :     /**
972 :     * Description: Unsure.
973 :     * Forward params: function(this, entityid)
974 :     * Return type: None.
975 :     * Execute params: ExecuteHam(Ham_TFC_TakeEmpBlast, this, entityid);
976 :     */
977 :     Ham_TFC_TakeEmpBlast,
978 :    
979 :     /**
980 :     * Description: Unsure.
981 :     * Forward params: function(this)
982 :     * Return type: None.
983 :     * Execute params: ExecuteHam(Ham_TFC_EmpRemove, this);
984 :     */
985 :     Ham_TFC_EmpRemove,
986 :    
987 :    
988 :     /**
989 :     * Description: Unsure.
990 :     * Forward params: function(this, entityid, Float:floata)
991 :     * Return type: None.
992 :     * Execute params: ExecuteHam(Ham_TFC_TakeConcussionBlast, this, entityid, Float:floata);
993 :     */
994 :     Ham_TFC_TakeConcussionBlast,
995 :    
996 :     /**
997 :     * Description: Unsure.
998 :     * Forward params: function(this, entityid)
999 :     * Return type: None.
1000 :     * Execute params: ExecuteHam(Ham_TFC_Concuss, this, entityid);
1001 :     */
1002 :     Ham_TFC_Concuss,
1003 :    
1004 :    
1005 :     /**
1006 :     * Description: Unsure.
1007 :     * Is only in ESF Open Beta.
1008 :     * Forward params: function(this)
1009 :     * Return type: Integer (boolean).
1010 :     * Execute params: ExecuteHam(Ham_ESF_IsEnvModel, this);
1011 :     */
1012 :     Ham_ESF_IsEnvModel,
1013 :    
1014 :     /**
1015 :     * Description: Unsure.
1016 :     * Is only in ESF Open Beta.
1017 :     * Forward params: function(this, entityida, entityidb, Float:floata, Float:floatb, dmgbits)
1018 :     * Return type: Integer.
1019 :     * Execute params: ExecuteHam(Ham_ESF_TakeDamage2, this, entityida, entityidb, Float:floata, Float:floatb, dmgbits);
1020 :     */
1021 :     Ham_ESF_TakeDamage2,
1022 :    
1023 :     /**
1024 :     * Description: Returns how many points each entity is worth.
1025 :     * Forward params: function(this)
1026 :     * Return type: Integer.
1027 :     * Execute params: ExecuteHam(Ham_NS_GetPointValue, this);
1028 :     */
1029 :     Ham_NS_GetPointValue,
1030 :    
1031 :     /**
1032 :     * Description: Unsure. Probably awards this with the killing of idvictim.
1033 :     * Forward params: function(this, idvictim)
1034 :     * Return type: None.
1035 :     * Execute params: ExecuteHam(Ham_NS_AwardKill, this, idvictim);
1036 :     */
1037 :     Ham_NS_AwardKill,
1038 :    
1039 :     /**
1040 :     * Description: Unsure, probably whenever an entity resets after a new round.
1041 :     * Forward params: function(this)
1042 :     * Return type: None.
1043 :     * Execute params: ExecuteHam(Ham_NS_ResetEntity, this);
1044 :     */
1045 :     Ham_NS_ResetEntity,
1046 :    
1047 :     /**
1048 :     * Description: Unsure.
1049 :     * Forward params: function(this)
1050 :     * Return type: None.
1051 :     * Execute params: ExecuteHam(Ham_NS_UpdateOnRemove, this)
1052 :     */
1053 :     Ham_NS_UpdateOnRemove,
1054 :    
1055 :    
1056 :     /** Virtual functions added to TS in TS 3 */
1057 :    
1058 :     /**
1059 :     * Description: Unsure.
1060 :     * Forward params: function(this)
1061 :     * Return type: None.
1062 :     * Execute params: ExecuteHam(Ham_TS_GiveSlowMul, this)
1063 :     */
1064 :     Ham_TS_GiveSlowMul,
1065 :    
1066 :     /**
1067 :     * Description: Unsure. The second paramater is actually a char.
1068 :     * Forward params: function(this, Float:someval, someotherval)
1069 :     * Return type: None.
1070 :     * Execute params: ExecuteHam(Ham_TS_GoSlow, this, Float:someval, someotherval)
1071 :     */
1072 :     Ham_TS_GoSlow,
1073 :    
1074 :     /**
1075 :     * Description: Probably returns true if the user is in slow mo.
1076 :     * Forward params: function(this)
1077 :     * Return type: Integer (boolean).
1078 :     * Execute params: ExecuteHam(Ham_TS_InSlow, this)
1079 :     */
1080 :     Ham_TS_InSlow,
1081 :    
1082 :     /**
1083 :     * Description: Returns true if the entity is an objective.
1084 :     * Forward params: function(this)
1085 :     * Return type: Integer (boolean).
1086 :     * Execute params: ExecuteHam(Ham_TS_IsObjective, this)
1087 :     */
1088 :     Ham_TS_IsObjective,
1089 :    
1090 :     /**
1091 :     * Description: Unsure.
1092 :     * Forward params: function(this, bool:someval)
1093 :     * Return type: None.
1094 :     * Execute params: ExecuteHam(Ham_TS_EnableObjective, this, bool:someval)
1095 :     */
1096 :     Ham_TS_EnableObjective,
1097 :    
1098 :     /**
1099 :     * Description: Probably called when the engine call to OnEntFreePrivateData is called (the entity destructor.)
1100 :     * Forward params: function(this)
1101 :     * Return type: None.
1102 :     * Execute params: ExecuteHam(Ham_TS_OnEntFreePrivateData, this)
1103 :     */
1104 :     Ham_TS_OnFreeEntPrivateData,
1105 :    
1106 :     /**
1107 :     * Description: Probably called when the engine call to ShouldCollide is called.
1108 :     * Forward params: function(this, otherEntity)
1109 :     * Return type: Integer (boolean).
1110 :     * Execute params: ExecuteHam(Ham_TS_ShouldCollide, this, otherEntity)
1111 :     */
1112 :     Ham_TS_ShouldCollide,
1113 :    
1114 :    
1115 :     /**
1116 :     * DONT USE ME LOL
1117 :     */
1118 :     HAM_LAST_ENTRY_DONT_USE_ME_LOL
1119 :     };
1120 :    
1121 :     enum HamError
1122 :     {
1123 :     HAM_OK = 0,
1124 :    
1125 :     HAM_INVALID_FUNC, // The function is not valid
1126 :     HAM_FUNC_NOT_CONFIGURED, // This function is not configured in hamdata.ini
1127 :    
1128 :     HAM_ERR_END
1129 :     };

Contact
ViewVC Help
Powered by ViewVC 1.0.4