Xonotic
events.qh
Go to the documentation of this file.
1 #pragma once
2 
4 
5 // register all possible hooks here
6 
7 // to use a hook, first register your mutator using REGISTER_MUTATOR
8 // then create your function using MUTATOR_HOOKFUNCTION
9 
11 #define EV_MakePlayerObserver(i, o) \
12  i(entity, MUTATOR_ARGV_0_entity) \
13  i(bool, MUTATOR_ARGV_1_bool) \
14 
15 MUTATOR_HOOKABLE(MakePlayerObserver, EV_MakePlayerObserver)
16 
17 
18 #define EV_PutClientInServer(i, o) \
19  i(entity, MUTATOR_ARGV_0_entity) \
20 
22 
26  #define EV_ForbidSpawn(i, o) \
27  i(entity, MUTATOR_ARGV_0_entity) \
28 
29 MUTATOR_HOOKABLE(ForbidSpawn, EV_ForbidSpawn);
30 
32 #define EV_AutoJoinOnConnection(i, o) \
33  i(entity, MUTATOR_ARGV_0_entity) \
34 
35 MUTATOR_HOOKABLE(AutoJoinOnConnection, EV_AutoJoinOnConnection);
36 
38 #define EV_ForbidRandomStartWeapons(i, o) \
39  i(entity, MUTATOR_ARGV_0_entity) \
40 
41 MUTATOR_HOOKABLE(ForbidRandomStartWeapons, EV_ForbidRandomStartWeapons);
42 
44 #define EV_PlayerSpawn(i, o) \
45  i(entity, MUTATOR_ARGV_0_entity) \
46  i(entity, MUTATOR_ARGV_1_entity) \
47 
48 MUTATOR_HOOKABLE(PlayerSpawn, EV_PlayerSpawn);
49 
51 #define EV_PlayerWeaponSelect(i, o) \
52  i(entity, MUTATOR_ARGV_0_entity) \
53 
54 MUTATOR_HOOKABLE(PlayerWeaponSelect, EV_PlayerWeaponSelect);
55 
57 #define EV_reset_map_global(i, o) \
58 
59 MUTATOR_HOOKABLE(reset_map_global, EV_reset_map_global);
60 
62 #define EV_reset_map_players(i, o) \
63 
64 MUTATOR_HOOKABLE(reset_map_players, EV_reset_map_players);
65 
67 #define EV_ForbidPlayerScore_Clear(i, o) \
68 
69 MUTATOR_HOOKABLE(ForbidPlayerScore_Clear, EV_ForbidPlayerScore_Clear);
70 
72 #define EV_ClientDisconnect(i, o) \
73  i(entity, MUTATOR_ARGV_0_entity) \
74 
76 
78 #define EV_PlayerDies(i, o) \
79  i(entity, MUTATOR_ARGV_0_entity) \
80  i(entity, MUTATOR_ARGV_1_entity) \
81  i(entity, MUTATOR_ARGV_2_entity) \
82  i(float, MUTATOR_ARGV_3_float) \
83  i(float, MUTATOR_ARGV_4_float) \
84  o(float, MUTATOR_ARGV_4_float) \
85 
86 MUTATOR_HOOKABLE(PlayerDies, EV_PlayerDies);
87 
89 #define EV_PlayerDied(i, o) \
90  i(entity, MUTATOR_ARGV_0_entity) \
91 
92 MUTATOR_HOOKABLE(PlayerDied, EV_PlayerDied);
93 
95 #define EV_ClientObituary(i, o) \
96  i(entity, MUTATOR_ARGV_0_entity) \
97  i(entity, MUTATOR_ARGV_1_entity) \
98  i(entity, MUTATOR_ARGV_2_entity) \
99  i(float, MUTATOR_ARGV_3_float) \
100  i(entity, MUTATOR_ARGV_4_entity) \
101  o(bool, MUTATOR_ARGV_5_bool) \
102 
103 MUTATOR_HOOKABLE(ClientObituary, EV_ClientObituary);
104 
106 #define EV_FragCenterMessage(i, o) \
107  i(entity, MUTATOR_ARGV_0_entity) \
108  i(entity, MUTATOR_ARGV_1_entity) \
109  i(float, MUTATOR_ARGV_2_float) \
110  i(int, MUTATOR_ARGV_3_int) \
111  i(int, MUTATOR_ARGV_4_int) \
112 
113 MUTATOR_HOOKABLE(FragCenterMessage, EV_FragCenterMessage);
114 
116 #define EV_PlayHitsound(i, o) \
117  i(entity, MUTATOR_ARGV_0_entity) \
118  i(entity, MUTATOR_ARGV_1_entity) \
119 
120 MUTATOR_HOOKABLE(PlayHitsound, EV_PlayHitsound);
121 
123 #define EV_ItemModel(i, o) \
124  i(string, MUTATOR_ARGV_0_string) \
125  i(string, MUTATOR_ARGV_1_string) \
126  o(string, MUTATOR_ARGV_1_string) \
127 
128 MUTATOR_HOOKABLE(ItemModel, EV_ItemModel);
129 
131 #define EV_ItemSound(i, o) \
132  i(string, MUTATOR_ARGV_0_string) \
133  i(string, MUTATOR_ARGV_1_string) \
134  o(string, MUTATOR_ARGV_1_string) \
135 
136 MUTATOR_HOOKABLE(ItemSound, EV_ItemSound);
137 
139 #define EV_GiveFragsForKill(i, o) \
140  i(entity, MUTATOR_ARGV_0_entity) \
141  i(entity, MUTATOR_ARGV_1_entity) \
142  i(float, MUTATOR_ARGV_2_float) \
143  o(float, MUTATOR_ARGV_2_float) \
144  i(float, MUTATOR_ARGV_3_float) \
145  i(entity, MUTATOR_ARGV_4_entity) \
146 
147 MUTATOR_HOOKABLE(GiveFragsForKill, EV_GiveFragsForKill);
148 
150 MUTATOR_HOOKABLE(MatchEnd, EV_NO_ARGS);
151 
156 #define EV_TeamBalance_CheckAllowedTeams(i, o) \
157  i(float, MUTATOR_ARGV_0_float) \
158  o(float, MUTATOR_ARGV_0_float) \
159  i(string, MUTATOR_ARGV_1_string) \
160  o(string, MUTATOR_ARGV_1_string) \
161  i(entity, MUTATOR_ARGV_2_entity) \
162 
165 
168 
170 #define EV_TeamBalance_GetTeamCount(i, o) \
171  i(float, MUTATOR_ARGV_0_float) \
172  i(entity, MUTATOR_ARGV_1_entity) \
173  o(float, MUTATOR_ARGV_2_float) \
174  o(float, MUTATOR_ARGV_3_float) \
175 
176 MUTATOR_HOOKABLE(TeamBalance_GetTeamCount, EV_TeamBalance_GetTeamCount);
177 
181 #define EV_TeamBalance_FindBestTeams(i, o) \
182  i(entity, MUTATOR_ARGV_0_entity) \
183  o(float, MUTATOR_ARGV_1_float) \
184 
186 
189 #define EV_TeamBalance_GetPlayerForTeamSwitch(i, o) \
190  i(int, MUTATOR_ARGV_0_int) \
191  i(int, MUTATOR_ARGV_1_int) \
192  i(bool, MUTATOR_ARGV_2_bool) \
193  o(entity, MUTATOR_ARGV_3_entity) \
194 
197 
199 #define EV_SpectateCopy(i, o) \
200  i(entity, MUTATOR_ARGV_0_entity) \
201  i(entity, MUTATOR_ARGV_1_entity) \
202 
204 
206 #define EV_FormatMessage(i, o) \
207  i(entity, MUTATOR_ARGV_0_entity) \
208  i(string, MUTATOR_ARGV_1_string) \
209  i(string, MUTATOR_ARGV_2_string) \
210  o(string, MUTATOR_ARGV_2_string) \
211  i(string, MUTATOR_ARGV_3_string) \
212 
213 MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage);
214 
216 #define EV_PreFormatMessage(i, o) \
217  i(entity, MUTATOR_ARGV_0_entity) \
218  i(string, MUTATOR_ARGV_1_string) \
219  o(string, MUTATOR_ARGV_1_string) \
220 
221 MUTATOR_HOOKABLE(PreFormatMessage, EV_PreFormatMessage);
222 
224 #define EV_ForbidThrowCurrentWeapon(i, o) \
225  i(entity, MUTATOR_ARGV_0_entity) \
226  i(entity, MUTATOR_ARGV_1_entity) \
227 
228 MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon, EV_ForbidThrowCurrentWeapon);
229 
231 #define EV_ForbidDropCurrentWeapon(i, o) \
232  i(entity, MUTATOR_ARGV_0_entity) \
233  i(int, MUTATOR_ARGV_1_int) \
234 
235 MUTATOR_HOOKABLE(ForbidDropCurrentWeapon, EV_ForbidDropCurrentWeapon);
236 
239 
241 #define EV_WeaponRateFactor(i, o) \
242  i(float, MUTATOR_ARGV_0_float) \
243  o(float, MUTATOR_ARGV_0_float) \
244  i(entity, MUTATOR_ARGV_1_entity) \
245 
246 MUTATOR_HOOKABLE(WeaponRateFactor, EV_WeaponRateFactor);
247 
249 #define EV_WeaponSpeedFactor(i, o) \
250  i(float, MUTATOR_ARGV_0_float) \
251  o(float, MUTATOR_ARGV_0_float) \
252  i(entity, MUTATOR_ARGV_1_entity) \
253 
254 MUTATOR_HOOKABLE(WeaponSpeedFactor, EV_WeaponSpeedFactor);
255 
257 MUTATOR_HOOKABLE(SetStartItems, EV_NO_ARGS);
258 
260 #define EV_CustomizeWaypoint(i, o) \
261  i(entity, MUTATOR_ARGV_0_entity) \
262  i(entity, MUTATOR_ARGV_1_entity) \
263 
264 MUTATOR_HOOKABLE(CustomizeWaypoint, EV_CustomizeWaypoint);
265 
269 #define EV_FilterItemDefinition(i, o) \
270  i(entity, MUTATOR_ARGV_0_entity) \
271 
272 MUTATOR_HOOKABLE(FilterItemDefinition, EV_FilterItemDefinition);
273 
278 #define EV_FilterItem(i, o) \
279  i(entity, MUTATOR_ARGV_0_entity) \
280 
281 MUTATOR_HOOKABLE(FilterItem, EV_FilterItem);
282 
284 #define EV_TurretSpawn(i, o) \
285  i(entity, MUTATOR_ARGV_0_entity) \
286 
287 MUTATOR_HOOKABLE(TurretSpawn, EV_TurretSpawn);
288 
290 #define EV_TurretFire(i, o) \
291  i(entity, MUTATOR_ARGV_0_entity) \
292 
293 MUTATOR_HOOKABLE(TurretFire, EV_TurretFire);
294 
296 #define EV_Turret_CheckFire(i, o) \
297  i(entity, MUTATOR_ARGV_0_entity) \
298  o(bool, MUTATOR_ARGV_1_bool) \
299 
300 MUTATOR_HOOKABLE(Turret_CheckFire, EV_Turret_CheckFire);
301 
303 #define EV_OnEntityPreSpawn(i, o) \
304  i(entity, MUTATOR_ARGV_0_entity) \
305 
306 MUTATOR_HOOKABLE(OnEntityPreSpawn, EV_OnEntityPreSpawn);
307 
309 #define EV_PlayerPreThink(i, o) \
310  i(entity, MUTATOR_ARGV_0_entity) \
311 
313 
315 #define EV_GetPressedKeys(i, o) \
316  i(entity, MUTATOR_ARGV_0_entity) \
317 
319 
331 #define EV_GetCvars(i, o) \
332  i(float, get_cvars_f) \
333  i(string, get_cvars_s) \
334 
336 string get_cvars_s;
337 MUTATOR_HOOKABLE(GetCvars, EV_NO_ARGS); // NOTE: Can't use EV_GetCvars because of `SZ_GetSpace: overflow`
338 
340 #define EV_EditProjectile(i, o) \
341  i(entity, MUTATOR_ARGV_0_entity) \
342  i(entity, MUTATOR_ARGV_1_entity) \
343 
344 MUTATOR_HOOKABLE(EditProjectile, EV_EditProjectile);
345 
347 #define EV_MonsterSpawn(i, o) \
348  i(entity, MUTATOR_ARGV_0_entity) \
349 
350 MUTATOR_HOOKABLE(MonsterSpawn, EV_MonsterSpawn);
351 
353 #define EV_MonsterDies(i, o) \
354  i(entity, MUTATOR_ARGV_0_entity) \
355  i(entity, MUTATOR_ARGV_1_entity) \
356  i(float, MUTATOR_ARGV_2_float) \
357 
358 MUTATOR_HOOKABLE(MonsterDies, EV_MonsterDies);
359 
361 #define EV_MonsterRemove(i, o) \
362  i(entity, MUTATOR_ARGV_0_entity) \
363 
364 MUTATOR_HOOKABLE(MonsterRemove, EV_MonsterRemove);
365 
367 #define EV_MonsterRespawn(i, o) \
368  i(entity, MUTATOR_ARGV_0_entity) \
369 
370 MUTATOR_HOOKABLE(MonsterRespawn, EV_MonsterRespawn);
371 
373 #define EV_MonsterDropItem(i, o) \
374  /* monster */ i(entity, MUTATOR_ARGV_0_entity) \
375  /* item (can be removed or changed) */ i(entity, MUTATOR_ARGV_1_entity) \
376  o(entity, MUTATOR_ARGV_1_entity) \
377  /* attacker */ i(entity, MUTATOR_ARGV_2_entity) \
378 
379 .entity monster_loot;
380 MUTATOR_HOOKABLE(MonsterDropItem, EV_MonsterDropItem);
381 
386 #define EV_MonsterMove(i, o) \
387  i(entity, MUTATOR_ARGV_0_entity) \
388  i(float, MUTATOR_ARGV_1_float) \
389  o(float, MUTATOR_ARGV_1_float) \
390  i(float, MUTATOR_ARGV_2_float) \
391  o(float, MUTATOR_ARGV_2_float) \
392  i(entity, MUTATOR_ARGV_3_entity) \
393  o(entity, MUTATOR_ARGV_3_entity) \
394 
395 MUTATOR_HOOKABLE(MonsterMove, EV_MonsterMove);
396 
398 MUTATOR_HOOKABLE(MonsterFindTarget, EV_NO_ARGS);
399 
403 #define EV_MonsterValidTarget(i, o) \
404  i(entity, MUTATOR_ARGV_0_entity) \
405  i(entity, MUTATOR_ARGV_1_entity) \
406 
407 MUTATOR_HOOKABLE(MonsterValidTarget, EV_MonsterValidTarget);
408 
410 #define EV_MonsterCheckBossFlag(i, o) \
411  i(entity, MUTATOR_ARGV_0_entity) \
412 
413 MUTATOR_HOOKABLE(MonsterCheckBossFlag, EV_MonsterCheckBossFlag);
414 
420  #define EV_AllowMobSpawning(i, o) \
421  i(entity, MUTATOR_ARGV_0_entity) \
422  o(string, MUTATOR_ARGV_1_string) \
423 
424 MUTATOR_HOOKABLE(AllowMobSpawning, EV_AllowMobSpawning);
425 
427 #define EV_PlayerDamage_SplitHealthArmor(i, o) \
428  i(entity, MUTATOR_ARGV_0_entity) \
429  i(entity, MUTATOR_ARGV_1_entity) \
430  i(entity, MUTATOR_ARGV_2_entity) \
431  i(vector, MUTATOR_ARGV_3_vector) \
432  i(float, MUTATOR_ARGV_4_float) \
433  o(float, MUTATOR_ARGV_4_float) \
434  i(float, MUTATOR_ARGV_5_float) \
435  o(float, MUTATOR_ARGV_5_float) \
436  i(float, MUTATOR_ARGV_6_float) \
437  i(float, MUTATOR_ARGV_7_float) \
438 
439 MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor, EV_PlayerDamage_SplitHealthArmor);
440 
445 #define EV_Damage_Calculate(i, o) \
446  i(entity, MUTATOR_ARGV_0_entity) \
447  i(entity, MUTATOR_ARGV_1_entity) \
448  i(entity, MUTATOR_ARGV_2_entity) \
449  i(float, MUTATOR_ARGV_3_float) \
450  i(float, MUTATOR_ARGV_4_float) \
451  o(float, MUTATOR_ARGV_4_float) \
452  i(float, MUTATOR_ARGV_5_float) \
453  o(float, MUTATOR_ARGV_5_float) \
454  i(vector, MUTATOR_ARGV_6_vector) \
455  o(vector, MUTATOR_ARGV_6_vector) \
456  i(entity, MUTATOR_ARGV_7_entity) \
457 
458 MUTATOR_HOOKABLE(Damage_Calculate, EV_Damage_Calculate);
459 
464 #define EV_PlayerDamaged(i, o) \
465  i(entity, MUTATOR_ARGV_0_entity) \
466  i(entity, MUTATOR_ARGV_1_entity) \
467  i(float, MUTATOR_ARGV_2_float) \
468  i(float, MUTATOR_ARGV_3_float) \
469  i(vector, MUTATOR_ARGV_4_vector) \
470  i(int, MUTATOR_ARGV_5_int) \
471  i(float, MUTATOR_ARGV_6_float) \
472 
473 MUTATOR_HOOKABLE(PlayerDamaged, EV_PlayerDamaged);
474 
478 #define EV_W_DecreaseAmmo(i, o) \
479  i(entity, MUTATOR_ARGV_0_entity) \
480  i(entity, MUTATOR_ARGV_1_entity) \
481  i(float, MUTATOR_ARGV_2_float) \
482  o(float, MUTATOR_ARGV_2_float) \
483 
485 
489 #define EV_W_Reload(i, o) \
490  i(entity, MUTATOR_ARGV_0_entity) \
491 
493 
495 #define EV_PlayerPowerups(i, o) \
496  i(entity, MUTATOR_ARGV_0_entity) \
497  i(int, MUTATOR_ARGV_1_int) \
498 
499 MUTATOR_HOOKABLE(PlayerPowerups, EV_PlayerPowerups);
500 
505  #define EV_PlayerRegen(i, o) \
506  i(entity, MUTATOR_ARGV_0_entity) \
507  i(float, MUTATOR_ARGV_1_float) \
508  o(float, MUTATOR_ARGV_1_float) \
509  i(float, MUTATOR_ARGV_2_float) \
510  o(float, MUTATOR_ARGV_2_float) \
511  i(float, MUTATOR_ARGV_3_float) \
512  o(float, MUTATOR_ARGV_3_float) \
513  i(float, MUTATOR_ARGV_4_float) \
514  o(float, MUTATOR_ARGV_4_float) \
515  i(float, MUTATOR_ARGV_5_float) \
516  o(float, MUTATOR_ARGV_5_float) \
517  i(float, MUTATOR_ARGV_6_float) \
518  o(float, MUTATOR_ARGV_6_float) \
519  i(float, MUTATOR_ARGV_7_float) \
520  o(float, MUTATOR_ARGV_7_float) \
521  i(float, MUTATOR_ARGV_8_float) \
522  o(float, MUTATOR_ARGV_8_float) \
523  i(float, MUTATOR_ARGV_9_float) \
524  o(float, MUTATOR_ARGV_9_float) \
525  i(float, MUTATOR_ARGV_10_float) \
526  o(float, MUTATOR_ARGV_10_float) \
527 
528 MUTATOR_HOOKABLE(PlayerRegen, EV_PlayerRegen);
529 
535  #define EV_PlayerUseKey(i, o) \
536  i(entity, MUTATOR_ARGV_0_entity) \
537 
539 
563 #define EV_SV_ParseClientCommand(i, o) \
564  i(entity, MUTATOR_ARGV_0_entity) \
565  i(string, MUTATOR_ARGV_1_string) \
566  i(int, MUTATOR_ARGV_2_int) \
567  i(string, MUTATOR_ARGV_3_string) \
568 
570 
572 #define EV_SV_ParseServerCommand(i, o) \
573  i(string, MUTATOR_ARGV_0_string) \
574  i(int, MUTATOR_ARGV_1_int) \
575  i(string, MUTATOR_ARGV_2_string) \
576 
577 MUTATOR_HOOKABLE(SV_ParseServerCommand, EV_SV_ParseServerCommand);
578 
583 #define EV_Spawn_Score(i, o) \
584  i(entity, MUTATOR_ARGV_0_entity) \
585  i(entity, MUTATOR_ARGV_1_entity) \
586  i(vector, MUTATOR_ARGV_2_vector) \
587  o(vector, MUTATOR_ARGV_2_vector) \
588 
590 
592 MUTATOR_HOOKABLE(SV_StartFrame, EV_NO_ARGS);
593 
594 #define EV_SetModname(i, o) \
595  \
596  i(string, MUTATOR_ARGV_0_string) \
597  o(string, MUTATOR_ARGV_0_string) \
598 
599 MUTATOR_HOOKABLE(SetModname, EV_SetModname);
600 
605 #define EV_Item_Spawn(i, o) \
606  i(entity, MUTATOR_ARGV_0_entity) \
607 
608 MUTATOR_HOOKABLE(Item_Spawn, EV_Item_Spawn);
609 
610 #define EV_SetWeaponreplace(i, o) \
611  i(entity, MUTATOR_ARGV_0_entity) \
612  i(entity, MUTATOR_ARGV_1_entity) \
613  i(string, MUTATOR_ARGV_2_string) \
614  o(string, MUTATOR_ARGV_2_string) \
615 
616 MUTATOR_HOOKABLE(SetWeaponreplace, EV_SetWeaponreplace);
617 
619 #define EV_Item_RespawnCountdown(i, o) \
620  i(entity, MUTATOR_ARGV_0_entity) \
621 
623 
625 #define EV_BotShouldAttack(i, o) \
626  i(entity, MUTATOR_ARGV_0_entity) \
627  i(entity, MUTATOR_ARGV_1_entity) \
628 
629 MUTATOR_HOOKABLE(BotShouldAttack, EV_BotShouldAttack);
630 
635 #define EV_PortalTeleport(i, o) \
636  i(entity, MUTATOR_ARGV_0_entity) \
637 
638 MUTATOR_HOOKABLE(PortalTeleport, EV_PortalTeleport);
639 
646 #define EV_HelpMePing(i, o) \
647  i(entity, MUTATOR_ARGV_0_entity) \
648 
649 MUTATOR_HOOKABLE(HelpMePing, EV_HelpMePing);
650 
655 #define EV_VehicleInit(i, o) \
656  i(entity, MUTATOR_ARGV_0_entity) \
657 
658 MUTATOR_HOOKABLE(VehicleInit, EV_VehicleInit);
659 
664 #define EV_VehicleEnter(i, o) \
665  i(entity, MUTATOR_ARGV_0_entity) \
666  i(entity, MUTATOR_ARGV_1_entity) \
667 
668 MUTATOR_HOOKABLE(VehicleEnter, EV_VehicleEnter);
669 
674 #define EV_VehicleTouch(i, o) \
675  i(entity, MUTATOR_ARGV_0_entity) \
676  i(entity, MUTATOR_ARGV_1_entity) \
677 
678 MUTATOR_HOOKABLE(VehicleTouch, EV_VehicleTouch);
679 
684 #define EV_VehicleExit(i, o) \
685  i(entity, MUTATOR_ARGV_0_entity) \
686  i(entity, MUTATOR_ARGV_1_entity) \
687 
688 MUTATOR_HOOKABLE(VehicleExit, EV_VehicleExit);
689 
691 #define EV_AbortSpeedrun(i, o) \
692  i(entity, MUTATOR_ARGV_0_entity) \
693 
694 MUTATOR_HOOKABLE(AbortSpeedrun, EV_AbortSpeedrun);
695 
697 #define EV_ItemTouch(i, o) \
698  i(entity, MUTATOR_ARGV_0_entity) \
699  i(entity, MUTATOR_ARGV_1_entity) \
700  o(entity, MUTATOR_ARGV_1_entity) \
701 
702 MUTATOR_HOOKABLE(ItemTouch, EV_ItemTouch);
703 
704 enum {
705  MUT_ITEMTOUCH_CONTINUE, // return this flag to make the function continue as normal
706  MUT_ITEMTOUCH_RETURN, // return this flag to make the function return (handled entirely by mutator)
707  MUT_ITEMTOUCH_PICKUP // return this flag to have the item "picked up" and taken even after mutator handled it
708 };
709 
711 #define EV_ItemTouched(i, o) \
712  i(entity, MUTATOR_ARGV_0_entity) \
713  i(entity, MUTATOR_ARGV_1_entity) \
714 
715 MUTATOR_HOOKABLE(ItemTouched, EV_ItemTouched);
716 
719 #define EV_GetResourceLimit(i, o) \
720  i(entity, MUTATOR_ARGV_0_entity) \
721  i(entity, MUTATOR_ARGV_1_entity) \
722  i(float, MUTATOR_ARGV_2_float) \
723  o(float, MUTATOR_ARGV_2_float) \
724 
726 
729 #define EV_SetResource(i, o) \
730  i(entity, MUTATOR_ARGV_0_entity) \
731  i(entity, MUTATOR_ARGV_1_entity) \
732  o(entity, MUTATOR_ARGV_1_entity) \
733  i(float, MUTATOR_ARGV_2_float) \
734  o(float, MUTATOR_ARGV_2_float) \
735 
737 
741 #define EV_ResourceAmountChanged(i, o) \
742  i(entity, MUTATOR_ARGV_0_entity) \
743  i(entity, MUTATOR_ARGV_1_entity) \
744  i(float, MUTATOR_ARGV_2_float) \
745 
746 MUTATOR_HOOKABLE(ResourceAmountChanged, EV_ResourceAmountChanged);
747 
751 #define EV_ResourceWasted(i, o) \
752  i(entity, MUTATOR_ARGV_0_entity) \
753  i(entity, MUTATOR_ARGV_1_entity) \
754  i(float, MUTATOR_ARGV_2_float) \
755 
756 MUTATOR_HOOKABLE(ResourceWasted, EV_ResourceWasted);
757 
761 #define EV_GiveResource(i, o) \
762  i(entity, MUTATOR_ARGV_0_entity) \
763  i(entity, MUTATOR_ARGV_1_entity) \
764  o(entity, MUTATOR_ARGV_1_entity) \
765  i(float, MUTATOR_ARGV_2_float) \
766  o(float, MUTATOR_ARGV_2_float) \
767 
769 
772 #define EV_GiveResourceWithLimit(i, o) \
773  i(entity, MUTATOR_ARGV_0_entity) \
774  i(entity, MUTATOR_ARGV_1_entity) \
775  o(entity, MUTATOR_ARGV_1_entity) \
776  i(float, MUTATOR_ARGV_2_float) \
777  o(float, MUTATOR_ARGV_2_float) \
778  i(float, MUTATOR_ARGV_3_float) \
779  o(float, MUTATOR_ARGV_3_float) \
780 
782 
786 #define EV_TakeResource(i, o) \
787  i(entity, MUTATOR_ARGV_0_entity) \
788  i(entity, MUTATOR_ARGV_1_entity) \
789  o(entity, MUTATOR_ARGV_1_entity) \
790  i(float, MUTATOR_ARGV_2_float) \
791  o(float, MUTATOR_ARGV_2_float) \
792 
794 
797 #define EV_TakeResourceWithLimit(i, o) \
798  i(entity, MUTATOR_ARGV_0_entity) \
799  i(entity, MUTATOR_ARGV_1_entity) \
800  o(entity, MUTATOR_ARGV_1_entity) \
801  i(float, MUTATOR_ARGV_2_float) \
802  o(float, MUTATOR_ARGV_2_float) \
803  i(float, MUTATOR_ARGV_3_float) \
804  o(float, MUTATOR_ARGV_3_float) \
805 
807 
809 #define EV_ClientConnect(i, o) \
810  i(entity, MUTATOR_ARGV_0_entity) \
811 
813 
814 #define EV_HavocBot_ChooseRole(i, o) \
815  i(entity, MUTATOR_ARGV_0_entity) \
816 
817 MUTATOR_HOOKABLE(HavocBot_ChooseRole, EV_HavocBot_ChooseRole);
818 
820 #define EV_AccuracyTargetValid(i, o) \
821  i(entity, MUTATOR_ARGV_0_entity) \
822  i(entity, MUTATOR_ARGV_1_entity) \
823 
824 MUTATOR_HOOKABLE(AccuracyTargetValid, EV_AccuracyTargetValid);
825 enum {
826  MUT_ACCADD_VALID, // return this flag to make the function continue if target is a client
827  MUT_ACCADD_INVALID, // return this flag to make the function always continue
828  MUT_ACCADD_INDIFFERENT // return this flag to make the function always return
829 };
830 
832 MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
833 
835 #define EV_GetModelParams(i, o) \
836  i(string, MUTATOR_ARGV_0_string) \
837  i(string, MUTATOR_ARGV_1_string) \
838 
839 MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
840 
842 #define EV_FireBullet_Hit(i, o) \
843  i(entity, MUTATOR_ARGV_0_entity) \
844  i(entity, MUTATOR_ARGV_1_entity) \
845  i(vector, MUTATOR_ARGV_2_vector) \
846  i(vector, MUTATOR_ARGV_3_vector) \
847  i(float, MUTATOR_ARGV_4_float) \
848  o(float, MUTATOR_ARGV_4_float) \
849  i(entity, MUTATOR_ARGV_5_entity) \
850 
851 MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit);
852 
853 #define EV_FixPlayermodel(i, o) \
854  i(string, MUTATOR_ARGV_0_string) \
855  o(string, MUTATOR_ARGV_0_string) \
856  i(int, MUTATOR_ARGV_1_int) \
857  o(int, MUTATOR_ARGV_1_int) \
858  i(entity, MUTATOR_ARGV_2_entity) \
859 
861 
863 MUTATOR_HOOKABLE(Scores_CountFragsRemaining, EV_NO_ARGS);
864 
865 #define EV_GrappleHookThink(i, o) \
866  i(entity, MUTATOR_ARGV_0_entity) \
867  i(int, MUTATOR_ARGV_1_int) \
868  o(int, MUTATOR_ARGV_1_int) \
869  i(entity, MUTATOR_ARGV_2_entity) \
870  o(entity, MUTATOR_ARGV_2_entity) \
871  i(float, MUTATOR_ARGV_3_float) \
872  o(float, MUTATOR_ARGV_3_float) \
873 
874 MUTATOR_HOOKABLE(GrappleHookThink, EV_GrappleHookThink);
875 
876 #define EV_BuffModel_Customize(i, o) \
877  i(entity, MUTATOR_ARGV_0_entity) \
878  i(entity, MUTATOR_ARGV_1_entity) \
879 
880 MUTATOR_HOOKABLE(BuffModel_Customize, EV_BuffModel_Customize);
881 
883 #define EV_BuffTouch(i, o) \
884  i(entity, MUTATOR_ARGV_0_entity) \
885  i(entity, MUTATOR_ARGV_1_entity) \
886  o(entity, MUTATOR_ARGV_1_entity) \
887 
888 MUTATOR_HOOKABLE(BuffTouch, EV_BuffTouch);
889 
891 
893 
895 
896 #define EV_GetRecords(i, o) \
897  i(int, MUTATOR_ARGV_0_int) \
898  i(string, MUTATOR_ARGV_1_string) \
899  o(string, MUTATOR_ARGV_1_string) \
900 
901 MUTATOR_HOOKABLE(GetRecords, EV_GetRecords);
902 
903 #define EV_Race_FinalCheckpoint(i, o) \
904  i(entity, MUTATOR_ARGV_0_entity) \
905 
906 MUTATOR_HOOKABLE(Race_FinalCheckpoint, EV_Race_FinalCheckpoint);
907 
909 #define EV_ClientKill(i, o) \
910  i(entity, MUTATOR_ARGV_0_entity) \
911  i(float, MUTATOR_ARGV_1_float) \
912  o(float, MUTATOR_ARGV_1_float) \
913 
915 
917 #define EV_ClientKill_Now(i, o) \
918  i(entity, MUTATOR_ARGV_0_entity) \
919 
921 
922 #define EV_FixClientCvars(i, o) \
923  i(entity, MUTATOR_ARGV_0_entity) \
924 
926 
927 #define EV_SpectateSet(i, o) \
928  i(entity, MUTATOR_ARGV_0_entity) \
929  i(entity, MUTATOR_ARGV_1_entity) \
930  o(entity, MUTATOR_ARGV_1_entity) \
931 
933 
934 #define EV_SpectateNext(i, o) \
935  i(entity, MUTATOR_ARGV_0_entity) \
936  i(entity, MUTATOR_ARGV_1_entity) \
937  o(entity, MUTATOR_ARGV_1_entity) \
938 
940 
941 #define EV_SpectatePrev(i, o) \
942  i(entity, MUTATOR_ARGV_0_entity) \
943  i(entity, MUTATOR_ARGV_1_entity) \
944  o(entity, MUTATOR_ARGV_1_entity) \
945  i(entity, MUTATOR_ARGV_2_entity) \
946 
948 
949 enum {
950  MUT_SPECPREV_CONTINUE, // return this flag to make the function continue as normal
951  MUT_SPECPREV_RETURN, // return this flag to make the function return (handled entirely by mutator)
952  MUT_SPECPREV_FOUND // return this flag to make the function continue without default functions (handled mostly by mutator)
953 };
954 
956 #define EV_Bot_FixCount(i, o) \
957  i(int, MUTATOR_ARGV_0_int) \
958  o(int, MUTATOR_ARGV_0_int) \
959  i(int, MUTATOR_ARGV_1_int) \
960  o(int, MUTATOR_ARGV_1_int) \
961 
962 MUTATOR_HOOKABLE(Bot_FixCount, EV_Bot_FixCount);
963 
964 #define EV_ClientCommand_Spectate(i, o) \
965  i(entity, MUTATOR_ARGV_0_entity) \
966 
967 MUTATOR_HOOKABLE(ClientCommand_Spectate, EV_ClientCommand_Spectate);
968 
969 enum {
970  MUT_SPECCMD_CONTINUE, // return this flag to make the function continue as normal
971  MUT_SPECCMD_RETURN, // return this flag to make the function return (don't spectate)
972  MUT_SPECCMD_FORCE // return this flag to force the player to spectate, even if they're not a player
973 };
974 
975 #define EV_CheckRules_World(i, o) \
976  i(float, MUTATOR_ARGV_0_float) \
977  o(float, MUTATOR_ARGV_0_float) \
978  /* time limit */ i(float, MUTATOR_ARGV_1_float) \
979  /* frag limit */ i(float, MUTATOR_ARGV_2_float) \
980 
982 
983 #define EV_WantWeapon(i, o) \
984  i(entity, MUTATOR_ARGV_0_entity) \
985  i(float, MUTATOR_ARGV_1_float) \
986  o(float, MUTATOR_ARGV_1_float) \
987  i(bool, MUTATOR_ARGV_2_bool) \
988  o(bool, MUTATOR_ARGV_2_bool) \
989  i(bool, MUTATOR_ARGV_3_bool) \
990  o(bool, MUTATOR_ARGV_3_bool) \
991 
992 MUTATOR_HOOKABLE(WantWeapon, EV_WantWeapon);
993 
994 #define EV_AddPlayerScore(i, o) \
995  i(entity, MUTATOR_ARGV_0_entity) \
996  i(float, MUTATOR_ARGV_1_float) \
997  o(float, MUTATOR_ARGV_1_float) \
998  i(entity, MUTATOR_ARGV_2_entity) \
999 
1000 MUTATOR_HOOKABLE(AddPlayerScore, EV_AddPlayerScore);
1001 
1002 #define EV_AddedPlayerScore(i, o) \
1003  i(entity, MUTATOR_ARGV_0_entity) \
1004  i(float, MUTATOR_ARGV_1_float) \
1005  i(entity, MUTATOR_ARGV_2_entity) \
1006 
1007 MUTATOR_HOOKABLE(AddedPlayerScore, EV_AddPlayerScore);
1008 
1009 #define EV_GetPlayerStatus(i, o) \
1010  i(entity, MUTATOR_ARGV_0_entity) \
1011 
1012 MUTATOR_HOOKABLE(GetPlayerStatus, EV_GetPlayerStatus);
1013 
1014 #define EV_SetWeaponArena(i, o) \
1015  i(string, MUTATOR_ARGV_0_string) \
1016  o(string, MUTATOR_ARGV_0_string) \
1017 
1018 MUTATOR_HOOKABLE(SetWeaponArena, EV_SetWeaponArena);
1019 
1020 #define EV_DropSpecialItems(i, o) \
1021  i(entity, MUTATOR_ARGV_0_entity) \
1022 
1023 MUTATOR_HOOKABLE(DropSpecialItems, EV_DropSpecialItems);
1024 
1029 #define EV_AllowMobButcher(i, o) \
1030  o(string, MUTATOR_ARGV_0_string) \
1031 
1032 MUTATOR_HOOKABLE(AllowMobButcher, EV_AllowMobButcher);
1033 
1034 MUTATOR_HOOKABLE(ReadLevelCvars, EV_NO_ARGS);
1035 
1036 #define EV_SendWaypoint(i, o) \
1037  i(entity, MUTATOR_ARGV_0_entity) \
1038  i(entity, MUTATOR_ARGV_1_entity) \
1039  i(int, MUTATOR_ARGV_2_int) \
1040  o(int, MUTATOR_ARGV_2_int) \
1041  i(int, MUTATOR_ARGV_3_int) \
1042  o(int, MUTATOR_ARGV_3_int) \
1043 
1044 MUTATOR_HOOKABLE(SendWaypoint, EV_SendWaypoint);
1045 
1046 #define EV_TurretValidateTarget(i, o) \
1047  i(entity, MUTATOR_ARGV_0_entity) \
1048  i(entity, MUTATOR_ARGV_1_entity) \
1049  i(int, MUTATOR_ARGV_2_int) \
1050  o(float, MUTATOR_ARGV_3_float) \
1051 
1052 MUTATOR_HOOKABLE(TurretValidateTarget, EV_TurretValidateTarget);
1053 
1054 #define EV_TurretThink(i, o) \
1055  i(entity, MUTATOR_ARGV_0_entity) \
1056 
1057 MUTATOR_HOOKABLE(TurretThink, EV_TurretThink);
1058 
1059 MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
1060 
1062 #define EV_PrepareExplosionByDamage(i, o) \
1063  i(entity, MUTATOR_ARGV_0_entity) \
1064  i(entity, MUTATOR_ARGV_1_entity) \
1065 
1066 MUTATOR_HOOKABLE(PrepareExplosionByDamage, EV_PrepareExplosionByDamage);
1067 
1069 #define EV_MonsterModel(i, o) \
1070  i(string, MUTATOR_ARGV_0_string) \
1071  i(string, MUTATOR_ARGV_1_string) \
1072  o(string, MUTATOR_ARGV_1_string) \
1073 
1074 MUTATOR_HOOKABLE(MonsterModel, EV_MonsterModel);
1075 
1079 #define EV_Player_ChangeTeam(i, o) \
1080  i(entity, MUTATOR_ARGV_0_entity) \
1081  i(float, MUTATOR_ARGV_1_float) \
1082  i(float, MUTATOR_ARGV_2_float) \
1083 
1084 MUTATOR_HOOKABLE(Player_ChangeTeam, EV_Player_ChangeTeam);
1085 
1089 #define EV_Player_ChangedTeam(i, o) \
1090  i(entity, MUTATOR_ARGV_0_entity) \
1091  i(float, MUTATOR_ARGV_1_float) \
1092  i(float, MUTATOR_ARGV_2_float) \
1093 
1094 MUTATOR_HOOKABLE(Player_ChangedTeam, EV_Player_ChangedTeam);
1095 
1099 #define EV_Player_ChangeTeamKill(i, o) \
1100  i(entity, MUTATOR_ARGV_0_entity) \
1101 
1102 MUTATOR_HOOKABLE(Player_ChangeTeamKill, EV_Player_ChangeTeamKill);
1103 
1104 
1105 #define EV_URI_GetCallback(i, o) \
1106  i(float, MUTATOR_ARGV_0_float) \
1107  i(float, MUTATOR_ARGV_1_float) \
1108  i(string, MUTATOR_ARGV_2_string) \
1109 
1110 MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback);
1111 
1115 #define EV_LockWeapon(i, o) \
1116  i(entity, MUTATOR_ARGV_0_entity) \
1117 
1118 MUTATOR_HOOKABLE(LockWeapon, EV_LockWeapon);
1119 
1123 #define EV_ForbidWeaponUse(i, o) \
1124  i(entity, MUTATOR_ARGV_0_entity) \
1125 
1126 MUTATOR_HOOKABLE(ForbidWeaponUse, EV_ForbidWeaponUse);
1127 
1129 #define EV_CopyBody(i, o) \
1130  i(entity, MUTATOR_ARGV_0_entity) \
1131  i(entity, MUTATOR_ARGV_1_entity) \
1132  i(bool, MUTATOR_ARGV_2_bool) \
1133 
1135 
1137 #define EV_ChatMessage(i, o) \
1138  i(entity, MUTATOR_ARGV_0_entity) \
1139  i(int, MUTATOR_ARGV_1_int) \
1140  o(int, MUTATOR_ARGV_1_int) \
1141 
1142 MUTATOR_HOOKABLE(ChatMessage, EV_ChatMessage);
1143 
1145 #define EV_ChatMessageTo(i, o) \
1146  i(entity, MUTATOR_ARGV_0_entity) \
1147  i(entity, MUTATOR_ARGV_1_entity) \
1148 
1149 MUTATOR_HOOKABLE(ChatMessageTo, EV_ChatMessageTo);
1150 
1152 MUTATOR_HOOKABLE(ReadyRestart_Deny, EV_NO_ARGS);
1153 
1155 #define EV_FusionReactor_ValidTarget(i, o) \
1156  i(entity, MUTATOR_ARGV_0_entity) \
1157  i(entity, MUTATOR_ARGV_1_entity) \
1158 
1159 MUTATOR_HOOKABLE(FusionReactor_ValidTarget, EV_FusionReactor_ValidTarget);
1160 
1161 enum {
1162  MUT_FUSREAC_TARG_CONTINUE, // return this flag to make the function continue as normal
1163  MUT_FUSREAC_TARG_VALID, // return this flag to make the function return true (valid target)
1164  MUT_FUSREAC_TARG_INVALID // return this flag to make the function return false (invalid target)
1165 };
1166 
1168 #define EV_HideTeamNagger(i, o) \
1169  i(entity, MUTATOR_ARGV_0_entity) \
1170 
1171 MUTATOR_HOOKABLE(HideTeamNagger, EV_HideTeamNagger);
1172 
1174 #define EV_Item_ScheduleRespawn(i, o) \
1175  i(entity, MUTATOR_ARGV_0_entity) \
1176  i(float, MUTATOR_ARGV_1_float) \
1177 
1179 
1181 #define EV_PlayerPhysics_UpdateStats(i, o) \
1182  i(entity, MUTATOR_ARGV_0_entity) \
1183 
1184 MUTATOR_HOOKABLE(PlayerPhysics_UpdateStats, EV_PlayerPhysics_UpdateStats);
1185 
1187 #define EV_PlayerPhysics_PostUpdateStats(i, o) \
1188  i(entity, MUTATOR_ARGV_0_entity) \
1189  i(float, MUTATOR_ARGV_1_float) \
1190 
1191 MUTATOR_HOOKABLE(PlayerPhysics_PostUpdateStats, EV_PlayerPhysics_PostUpdateStats);
1192 
1194 #define EV_HavocBot_Aim(i, o) \
1195  i(entity, MUTATOR_ARGV_0_entity) \
1196 
1197 MUTATOR_HOOKABLE(HavocBot_Aim, EV_HavocBot_Aim);
1198 
1200 #define EV_CalculateRespawnTime(i, o) \
1201  i(entity, MUTATOR_ARGV_0_entity) \
1202 
1203 MUTATOR_HOOKABLE(CalculateRespawnTime, EV_CalculateRespawnTime);
1204 
1206 #define EV_VoteCommand_Parse(i, o) \
1207  i(entity, MUTATOR_ARGV_0_entity) \
1208  i(string, MUTATOR_ARGV_1_string) \
1209  i(string, MUTATOR_ARGV_2_string) \
1210  i(float, MUTATOR_ARGV_3_float) \
1211  i(float, MUTATOR_ARGV_4_float) \
1212 
1213 MUTATOR_HOOKABLE(VoteCommand_Parse, EV_VoteCommand_Parse);
1214 
1215 enum {
1216  MUT_VOTEPARSE_CONTINUE, // return this flag to make the function continue as normal
1217  MUT_VOTEPARSE_SUCCESS, // return 1 (vote parsed)
1218  MUT_VOTEPARSE_INVALID, // return -1 (vote parsed but counted as invalid, no action or vote)
1219  MUT_VOTEPARSE_UNACCEPTABLE // return 0 (vote parameter counted as unacceptable, warns caller)
1220 };
1221 
1225 #define EV_Freeze(i, o) \
1226  i(entity, MUTATOR_ARGV_0_entity) \
1227  i(float, MUTATOR_ARGV_1_float) \
1228  i(int, MUTATOR_ARGV_2_int) \
1229 
1231 
1235 #define EV_Unfreeze(i, o) \
1236  i(entity, MUTATOR_ARGV_0_entity) \
1237 
1239 
1243 #define EV_GetPlayerLimit(i, o) \
1244  i(int, MUTATOR_ARGV_0_int) \
1245  o(int, MUTATOR_ARGV_0_int) \
1246 
1248 
1250 #define EV_LogDeath_AppendItemCodes(i, o) \
1251  i(entity, MUTATOR_ARGV_0_entity) \
1252  i(string, MUTATOR_ARGV_1_string) \
1253  o(string, MUTATOR_ARGV_1_string) \
1254 
1255 MUTATOR_HOOKABLE(LogDeath_AppendItemCodes, EV_LogDeath_AppendItemCodes);
1256 
1258 #define EV_AllowRocketJumping(i, o) \
1259  i(bool, MUTATOR_ARGV_0_bool) \
1260  o(bool, MUTATOR_ARGV_0_bool) \
1261 
1262 MUTATOR_HOOKABLE(AllowRocketJumping, EV_AllowRocketJumping);
1263 
1265 #define EV_W_PlayStrengthSound(i, o) \
1266  i(entity, MUTATOR_ARGV_0_entity) \
1267 
#define EV_SpectateSet(i, o)
Definition: events.qh:927
#define EV_ChatMessageTo(i, o)
return true to prevent sending a chat (private, team or regular) message from reaching a certain play...
Definition: events.qh:1145
#define EV_LogDeath_AppendItemCodes(i, o)
include special item codes for a death to the game log
Definition: events.qh:1250
#define EV_MonsterDies(i, o)
called when a monster dies
Definition: events.qh:353
#define EV_FixClientCvars(i, o)
Definition: events.qh:922
#define EV_PlayerPhysics_UpdateStats(i, o)
called before physics stats are set on a player, allows limited early customization ...
Definition: events.qh:1181
#define EV_WantWeapon(i, o)
Definition: events.qh:983
#define EV_ForbidRandomStartWeapons(i, o)
called when player spawns to determine whether to give them random start weapons. ...
Definition: events.qh:38
void SpectateCopy(entity this, entity spectatee)
Definition: client.qc:1713
#define EV_FilterItem(i, o)
checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fi...
Definition: events.qh:278
#define EV_OnEntityPreSpawn(i, o)
return error to prevent entity spawn, or modify the entity
Definition: events.qh:303
#define EV_GetModelParams(i, o)
Called when getting the global parameters for a model.
Definition: events.qh:835
#define EV_TurretSpawn(i, o)
return error to request removal
Definition: events.qh:284
#define EV_HavocBot_Aim(i, o)
return true to use your own aim target (or none at all)
Definition: events.qh:1194
#define EV_SpectateNext(i, o)
Definition: events.qh:934
#define EV_PlayerSpawn(i, o)
called when a player spawns as player, after shared setup, before his weapon is chosen (so items may ...
Definition: events.qh:44
#define EV_Bot_FixCount(i, o)
called when player triggered kill (or is changing teams), return error to not do anything ...
Definition: events.qh:956
vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck, bool targetcheck)
Definition: spawnpoints.qc:213
void ClientConnect(entity this)
ClientConnect
Definition: client.qc:1096
#define EV_Damage_Calculate(i, o)
called to adjust damage and force values which are applied to the player, used for e...
Definition: events.qh:445
#define EV_MonsterSpawn(i, o)
called when a monster spawns
Definition: events.qh:347
#define EV_Item_Spawn(i, o)
called for each item being spawned on a map, including dropped weapons return 1 to remove an item ...
Definition: events.qh:605
#define EV_SetResource(i, o)
Called when the amount of resource of an entity changes.
Definition: events.qh:729
#define EV_W_DecreaseAmmo(i, o)
Called by W_DecreaseAmmo.
Definition: events.qh:478
#define EV_AccuracyTargetValid(i, o)
called when a target is checked for accuracy
Definition: events.qh:820
void DecodeLevelParms(entity this)
Definition: client.qc:934
#define EV_MonsterValidTarget(i, o)
called when validating a monster's target
Definition: events.qh:403
#define EV_ClientKill(i, o)
called when player triggered kill (or is changing teams), return error to not do anything ...
Definition: events.qh:909
#define EV_TurretFire(i, o)
return error to not attack
Definition: events.qh:290
#define EV_FixPlayermodel(i, o)
Definition: events.qh:853
#define EV_VehicleExit(i, o)
called when a player exits a vehicle allows mutators to set special settings in this event ...
Definition: events.qh:684
#define EV_Freeze(i, o)
Called when freezing an entity (monster or player), return true to force showing a waypoint...
Definition: events.qh:1225
#define EV_TeamBalance_GetPlayerForTeamSwitch(i, o)
Called during autobalance.
Definition: events.qh:189
#define EV_EditProjectile(i, o)
can edit any "just fired" projectile
Definition: events.qh:340
#define EV_ClientCommand_Spectate(i, o)
Definition: events.qh:964
#define EV_Player_ChangeTeamKill(i, o)
Called when player is about to be killed when changing teams.
Definition: events.qh:1099
#define EV_PlayerRegen(i, o)
called every player think frame return 1 to disable regen
Definition: events.qh:505
void ClientKill(entity this)
Definition: clientkill.qc:208
#define EV_PlayerPreThink(i, o)
runs in the event loop for players; is called for ALL player entities, also bots, also the dead...
Definition: events.qh:309
int TeamBalance_FindBestTeams(entity balance, entity player, bool use_score)
Returns the bitmask of the teams that will make the game most balanced if the player joins any of the...
Definition: teamplay.qc:820
void SetChangeParms(entity this)
Definition: client.qc:921
#define EV_BuffTouch(i, o)
called at when a buff is touched.
Definition: events.qh:883
#define EV_GiveResource(i, o)
Called when entity is being given some resource.
Definition: events.qh:761
#define EV_FusionReactor_ValidTarget(i, o)
called when a fusion reactor is validating its target
Definition: events.qh:1155
#define EV_PlayerDied(i, o)
called after a player died.
Definition: events.qh:89
#define EV_FragCenterMessage(i, o)
allows overriding the frag centerprint messages
Definition: events.qh:106
#define EV_GetResourceLimit(i, o)
Called when the amount of entity resources changes.
Definition: events.qh:719
void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint)
Definition: damage.qc:494
#define EV_ChatMessage(i, o)
called when sending a chat message, ret argument can be changed to prevent the message ...
Definition: events.qh:1137
#define EV_GetRecords(i, o)
Definition: events.qh:896
#define EV_Unfreeze(i, o)
Called when an entity (monster or player) is defrosted.
Definition: events.qh:1235
#define EV_Turret_CheckFire(i, o)
return error to not attack
Definition: events.qh:296
int GetPlayerLimit()
Definition: client.qc:1990
#define EV_SetWeaponArena(i, o)
Definition: events.qh:1014
#define EV_ClientKill_Now(i, o)
called when player is about to be killed during kill command or changing teams
Definition: events.qh:917
#define EV_GiveResourceWithLimit(i, o)
Called when entity is being given some resource with specified limit.
Definition: events.qh:772
#define EV_Item_RespawnCountdown(i, o)
called when an item is about to respawn
Definition: events.qh:619
#define EV_ItemSound(i, o)
called when an item sound is about to be played, allows custom paths etc.
Definition: events.qh:131
#define EV_TeamBalance_FindBestTeams(i, o)
allows overriding the teams that will make the game most balanced if the player joins any of them...
Definition: events.qh:181
#define EV_ItemModel(i, o)
called when an item model is about to be set, allows custom paths etc.
Definition: events.qh:123
entity monster_loot
Definition: events.qh:379
#define EV_TeamBalance_GetTeamCount(i, o)
allows overriding of team counts
Definition: events.qh:170
void ClientKill_Now(entity this)
Definition: clientkill.qc:38
#define EV_WeaponRateFactor(i, o)
allows changing attack rate
Definition: events.qh:241
#define EV_ForbidThrowCurrentWeapon(i, o)
returns true if throwing the current weapon shall not be allowed
Definition: events.qh:224
#define EV_GiveFragsForKill(i, o)
called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for...
Definition: events.qh:139
#define EV_PreFormatMessage(i, o)
called before any formatting is applied, handy for tweaking the message before scripts get ahold of i...
Definition: events.qh:216
void CheckRules_World()
Definition: world.qc:1593
#define EV_PlayerUseKey(i, o)
called when the use key is pressed if MUTATOR_RETURNVALUE is 1, don't do anything return 1 if the use...
Definition: events.qh:535
void PlayerPreThink(entity this)
Definition: client.qc:2402
#define EV_SendWaypoint(i, o)
Definition: events.qh:1036
#define EV_PlayerWeaponSelect(i, o)
called after a player's weapon is chosen so it can be overriden here
Definition: events.qh:51
ClientDisconnect(this)
#define EV_URI_GetCallback(i, o)
Definition: events.qh:1105
#define EV_PrepareExplosionByDamage(i, o)
Definition: events.qh:1062
#define EV_CustomizeWaypoint(i, o)
called every frame.
Definition: events.qh:260
#define EV_GetPressedKeys(i, o)
TODO change this into a general PlayerPostThink hook?
Definition: events.qh:315
MUTATOR_HOOKABLE(CSQC_ConsoleCommand, EV_CSQC_ConsoleCommand)
#define EV_ClientObituary(i, o)
called when showing an obituary for the player.
Definition: events.qh:95
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
Definition: cl_resources.qc:31
void TakeResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Takes an entity some resource but not less than a limit.
Definition: cl_resources.qc:40
#define EV_AllowMobButcher(i, o)
called when an admin tries to kill all monsters return 1 to prevent spawning
Definition: events.qh:1029
#define EV_PlayerDamage_SplitHealthArmor(i, o)
called when a player gets damaged to e.g.
Definition: events.qh:427
#define EV_HideTeamNagger(i, o)
return true to hide the 'teamnumbers are imbalanced' message
Definition: events.qh:1168
void Unfreeze(entity targ, bool reset_health)
Definition: damage.qc:546
#define EV_MonsterModel(i, o)
called when a monster model is about to be set, allows custom paths etc.
Definition: events.qh:1069
#define EV_AutoJoinOnConnection(i, o)
returns true if client should be put as player on connection
Definition: events.qh:32
#define EV_SV_ParseClientCommand(i, o)
called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return fa...
Definition: events.qh:563
#define EV_VoteCommand_Parse(i, o)
called when parsing a vote command.
Definition: events.qh:1206
#define EV_VehicleTouch(i, o)
called when a player touches a vehicle return true to stop player from entering the vehicle ...
Definition: events.qh:674
bool SpectateNext(entity this)
Definition: client.qc:1883
#define EV_MonsterCheckBossFlag(i, o)
called to change a random monster to a miniboss
Definition: events.qh:410
#define EV_CheckRules_World(i, o)
Definition: events.qh:975
#define EV_Spawn_Score(i, o)
called when a spawnpoint is being evaluated return 1 to make the spawnpoint unusable ...
Definition: events.qh:583
void SV_ParseClientCommand(entity this, string command)
Definition: cmd.qc:866
#define EV_MonsterMove(i, o)
called when a monster moves returning true makes the monster stop
Definition: events.qh:386
#define EV_reset_map_players(i, o)
called in reset_map
Definition: events.qh:62
#define EV_MonsterRemove(i, o)
called when a monster dies
Definition: events.qh:361
#define EV_VehicleEnter(i, o)
called when a player enters a vehicle allows mutators to set special settings in this event ...
Definition: events.qh:664
void W_PlayStrengthSound(entity player)
Definition: common.qc:44
#define EV_CalculateRespawnTime(i, o)
return true to skip respawn time calculations
Definition: events.qh:1200
void GiveResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Gives an entity some resource but not more than a limit.
#define EV_SetModname(i, o)
Definition: events.qh:594
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
Definition: cl_resources.qc:26
#define EV_AllowRocketJumping(i, o)
Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a pr...
Definition: events.qh:1258
#define EV_FilterItemDefinition(i, o)
Check if items having the given definition are allowed to spawn.
Definition: events.qh:269
void GetCvars(entity this, entity store, int f)
Definition: getreplies.qc:381
void GetPressedKeys(entity this)
Definition: client.qc:1681
#define EV_TakeResourceWithLimit(i, o)
Called when some resource is being taken from an entity, with a limit.
Definition: events.qh:797
#define EV_FormatMessage(i, o)
called when formatting a chat message to replace fancy functions
Definition: events.qh:206
void TeamBalance_GetTeamCounts(entity balance, entity ignore)
Counts the number of players and various other information about each team.
Definition: teamplay.qc:681
#define EV_PlayerPhysics_PostUpdateStats(i, o)
called after physics stats are set on a player, allows post-initialization modifications ...
Definition: events.qh:1187
void PlayerUseKey(entity this)
Definition: client.qc:2349
string get_cvars_s
Definition: events.qh:336
#define EV_ForbidPlayerScore_Clear(i, o)
returns 1 if clearing player score shall not be allowed
Definition: events.qh:67
#define EV_Player_ChangeTeam(i, o)
Called before player changes their team.
Definition: events.qh:1079
#define EV_GetPlayerStatus(i, o)
Definition: events.qh:1009
#define EV_SetWeaponreplace(i, o)
Definition: events.qh:610
#define EV_ClientConnect(i, o)
called at when a player connect
Definition: events.qh:809
#define EV_ItemTouch(i, o)
called at when a item is touched.
Definition: events.qh:697
#define EV_FireBullet_Hit(i, o)
called when a bullet has hit a target
Definition: events.qh:842
#define EV_PlayerPowerups(i, o)
called at the end of player_powerups() in client.qc, used for manipulating the values which are set b...
Definition: events.qh:495
#define EV_PortalTeleport(i, o)
called whenever a player goes through a portal gun teleport allows you to strip a player of an item i...
Definition: events.qh:635
float get_cvars_f
Definition: events.qh:335
#define EV_ForbidDropCurrentWeapon(i, o)
returns true if dropping the current weapon shall not be allowed at any time including death ...
Definition: events.qh:231
#define EV_HavocBot_ChooseRole(i, o)
Definition: events.qh:814
#define EV_AddPlayerScore(i, o)
Definition: events.qh:994
#define EV_ResourceWasted(i, o)
Called when there was an attempt to set entity resources higher than their limit. ...
Definition: events.qh:751
float GetResourceLimit(entity e, Resource res_type)
Returns the maximum amount of the given resource.
Definition: sv_resources.qc:12
#define EV_HelpMePing(i, o)
called whenever a player uses impulse 33 (help me) in impulse.qc normally help me ping uses ...
Definition: events.qh:646
#define EV_PlayerDamaged(i, o)
Called when a player is damaged Returns true if damage shouldn't be logged.
Definition: events.qh:464
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
#define EV_MonsterRespawn(i, o)
called when a monster wants to respawn
Definition: events.qh:367
#define EV_PutClientInServer(i, o)
Definition: events.qh:18
#define EV_ForbidWeaponUse(i, o)
return true to prevent weapon use for a player
Definition: events.qh:1123
#define EV_AllowMobSpawning(i, o)
called when a player tries to spawn a monster return 1 to prevent spawning NOTE: requires reason if d...
Definition: events.qh:420
#define EV_TeamBalance_CheckAllowedTeams(i, o)
Allows adjusting allowed teams.
Definition: events.qh:156
#define EV_BuffModel_Customize(i, o)
Definition: events.qh:876
#define EV_GetPlayerLimit(i, o)
Called when a player is trying to join, argument is the number of players allowed to join the match...
Definition: events.qh:1243
#define EV_ForbidSpawn(i, o)
return true to prevent a spectator/observer to spawn as player
Definition: events.qh:26
void Item_RespawnCountdown(entity this)
Definition: items.qc:218
#define EV_TakeResource(i, o)
Called when some resource is being taken from an entity.
Definition: events.qh:786
#define EV_MonsterDropItem(i, o)
called when a monster is dropping loot
Definition: events.qh:373
#define EV_CopyBody(i, o)
called when creating a clone of the player (usually for corpses that stay after the player has re-spa...
Definition: events.qh:1129
#define EV_MakePlayerObserver(i, o)
called when a player becomes observer, after shared setup
Definition: events.qh:11
#define EV_ClientDisconnect(i, o)
called when a player disconnects
Definition: events.qh:72
#define EV_AbortSpeedrun(i, o)
called when a speedrun is aborted and the player is teleported back to start position ...
Definition: events.qh:691
#define EV_SpectateCopy(i, o)
copies variables for spectating "spectatee" to "this"
Definition: events.qh:199
void FixPlayermodel(entity player)
Definition: client.qc:423
#define EV_TurretValidateTarget(i, o)
Definition: events.qh:1046
#define EV_VehicleInit(i, o)
called when a vehicle initializes return true to remove the vehicle
Definition: events.qh:655
#define EV_W_PlayStrengthSound(i, o)
Called when weapons are performing their attack, useful for applying bonus attack sounds...
Definition: events.qh:1265
void SetDefaultAlpha()
Definition: world.qc:104
PutClientInServer(this)
#define EV_TurretThink(i, o)
Definition: events.qh:1054
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings...
Definition: teamplay.qc:487
bool SpectateSet(entity this)
Definition: client.qc:1800
#define EV_NO_ARGS(i, o)
Definition: events.qh:3
void CopyBody(entity this, float keepvelocity)
Definition: player.qc:64
#define EV_reset_map_global(i, o)
called in reset_map
Definition: events.qh:57
#define EV_PlayHitsound(i, o)
called when a player dies to e.g.
Definition: events.qh:116
#define EV_Race_FinalCheckpoint(i, o)
Definition: events.qh:903
#define EV_Player_ChangedTeam(i, o)
Called after player has changed their team.
Definition: events.qh:1089
#define EV_DropSpecialItems(i, o)
Definition: events.qh:1020
#define EV_WeaponSpeedFactor(i, o)
allows changing weapon speed (projectiles mostly)
Definition: events.qh:249
#define EV_BotShouldAttack(i, o)
called when a bot checks a target to attack
Definition: events.qh:625
void Item_ScheduleRespawn(entity e)
Definition: items.qc:351
#define EV_SV_ParseServerCommand(i, o)
please read EV_SV_ParseClientCommand description before using
Definition: events.qh:572
#define EV_Item_ScheduleRespawn(i, o)
return true to show a waypoint while the item is spawning
Definition: events.qh:1174
entity TeamBalance_GetPlayerForTeamSwitch(int source_team_index, int destination_team_index, bool is_bot)
Returns the player who is the most suitable for switching between the given teams.
Definition: teamplay.qc:997
#define EV_ResourceAmountChanged(i, o)
Called after the amount of resource of an entity has changed.
Definition: events.qh:741
void FixClientCvars(entity e)
Definition: client.qc:947
#define EV_SpectatePrev(i, o)
Definition: events.qh:941
#define EV_GrappleHookThink(i, o)
Definition: events.qh:865
bool SpectatePrev(entity this)
Definition: client.qc:1897
#define EV_W_Reload(i, o)
Called by W_Reload.
Definition: events.qh:489
#define EV_PlayerDies(i, o)
called when a player dies to e.g.
Definition: events.qh:78
#define EV_ItemTouched(i, o)
called after the item has been touched.
Definition: events.qh:711
#define EV_LockWeapon(i, o)
return true to lock weapon (can't be used nor changed) for a player
Definition: events.qh:1115
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
void SetNewParms()
Definition: client.qc:908