Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
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
31#define EV_CSQC_ConsoleCommand(i, o) \
32 i(string, MUTATOR_ARGV_0_string) \
33 i(int, MUTATOR_ARGV_1_int) \
34 i(string, MUTATOR_ARGV_2_string) \
35 /**/
37
38/* Called when the crosshair is being updated */
39MUTATOR_HOOKABLE(UpdateCrosshair, EV_NO_ARGS);
40
42#define EV_Ent_Projectile(i, o) \
43 i(entity, MUTATOR_ARGV_0_entity) \
44 /**/
46
48#define EV_EditProjectile(i, o) \
49 i(entity, MUTATOR_ARGV_0_entity) \
50 /**/
52
53/* Called when projectiles are precached */
54MUTATOR_HOOKABLE(PrecacheProjectiles, EV_NO_ARGS);
55
57#define EV_TagIndex_Update(i, o) \
58 i(entity, MUTATOR_ARGV_0_entity) \
59 /**/
61
63#define EV_TagIndex_Apply(i, o) \
64 i(entity, MUTATOR_ARGV_0_entity) \
65 /**/
67
69#define EV_Skeleton_CheckBones(i, o) \
70 i(entity, MUTATOR_ARGV_0_entity) \
71 /**/
73
75#define EV_Skeleton_CheckModel(i, o) \
76 i(entity, MUTATOR_ARGV_0_entity) \
77 /**/
79
81MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
82
84#define EV_GetModelParams(i, o) \
85 i(string, MUTATOR_ARGV_0_string) \
86 i(string, MUTATOR_ARGV_1_string) \
87 /**/
89
91#define EV_WantEventchase(i, o) \
92 i(entity, MUTATOR_ARGV_0_entity) \
93 /**/
95
97#define EV_CustomizeEventchase(i, o) \
98 i(entity, MUTATOR_ARGV_0_entity) \
99 /* current_view_origin_override */ o(vector, MUTATOR_ARGV_0_vector) \
100 /* view_offset_override */ o(vector, MUTATOR_ARGV_1_vector) \
101 /* chase_distance_override */ o(float, MUTATOR_ARGV_0_float) \
102 /**/
104
105#define EV_AnnouncerOption(i, o) \
106 i(string, MUTATOR_ARGV_0_string) \
107 o(string, MUTATOR_ARGV_0_string) \
108 /**/
110
112
113#define EV_HUD_Draw_overlay(i, o) \
114 /**/ o(vector, MUTATOR_ARGV_0_vector) \
115 /**/ o(float, MUTATOR_ARGV_1_float) \
116 /**/
118
120MUTATOR_HOOKABLE(HUD_Damage_show, EV_NO_ARGS);
121
122MUTATOR_HOOKABLE(HUD_Powerups_add, EV_NO_ARGS);
123
125MUTATOR_HOOKABLE(HUD_Physics_showoptional, EV_NO_ARGS);
126
128MUTATOR_HOOKABLE(HUD_StrafeHUD_showoptional, EV_NO_ARGS);
129
132
134#define EV_Particles_VortexBeam(i, o) \
135 i(vector, MUTATOR_ARGV_0_vector) \
136 i(vector, MUTATOR_ARGV_1_vector) \
137 /**/
139
141#define EV_Weapon_ImpactEffect(i, o) \
142 i(entity, MUTATOR_ARGV_0_entity) \
143 i(entity, MUTATOR_ARGV_1_entity) \
144 /**/
146
147/* NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false;
148*/
149#define EV_HUD_Command(i, o) \
150 i(int, MUTATOR_ARGV_0_int) \
151 /**/
153
155#define EV_DrawGrapplingHook(i, o) \
156 i(entity, MUTATOR_ARGV_0_entity) \
157 i(string, MUTATOR_ARGV_1_string) \
158 /***/ o(string, MUTATOR_ARGV_1_string) \
159 i(vector, MUTATOR_ARGV_2_vector) \
160 /***/ o(vector, MUTATOR_ARGV_2_vector) \
161 i(float, MUTATOR_ARGV_3_float) \
162 /**/
164
166#define EV_Ent_Update(i, o) \
167 i(entity, MUTATOR_ARGV_0_entity) \
168 i(bool, MUTATOR_ARGV_1_bool) \
169 /**/
171
174
177
179MUTATOR_HOOKABLE(DrawScoreboard_Force, EV_NO_ARGS);
180
182MUTATOR_HOOKABLE(DrawDeathScoreboard, EV_NO_ARGS);
183
185MUTATOR_HOOKABLE(DrawScoreboardAccuracy, EV_NO_ARGS);
186
188MUTATOR_HOOKABLE(DrawScoreboardItemStats, EV_NO_ARGS);
189
191#define EV_DrawInfoMessages(i, o) \
192 i(vector, MUTATOR_ARGV_0_vector) \
193 /***/ o(vector, MUTATOR_ARGV_0_vector) \
194 i(vector, MUTATOR_ARGV_1_vector) \
195 i(int, MUTATOR_ARGV_2_int) \
196 /***/ o(int, MUTATOR_ARGV_2_int) \
197 /**/
199
201#define EV_DrawViewModel(i, o) \
202 i(entity, MUTATOR_ARGV_0_entity) \
203 /**/
205
208
210#define EV_ForcePlayermodels_Skip(i, o) \
211 i(entity, MUTATOR_ARGV_0_entity) \
212 i(bool, MUTATOR_ARGV_1_bool) \
213 /**/
215
217#define EV_ForcePlayercolors_Skip(i, o) \
218 i(entity, MUTATOR_ARGV_0_entity) \
219 i(bool, MUTATOR_ARGV_1_bool) \
220 /**/
222
224#define EV_DamageInfo(i, o) \
225 i(entity, MUTATOR_ARGV_0_entity) \
226 i(int, MUTATOR_ARGV_1_int) \
227 i(vector, MUTATOR_ARGV_2_vector) \
228 /**/
230
233
235#define EV_ShowRankings(i, o) \
236 o(string, MUTATOR_ARGV_0_string) \
237 /**/
239
241#define EV_ShowNames_Draw(i, o) \
242 i(entity, MUTATOR_ARGV_0_entity) \
243 i(float, MUTATOR_ARGV_1_float) \
244 /***/ o(float, MUTATOR_ARGV_1_float) \
245 /**/
247
250
string AnnouncerOption()
Definition announcer.qc:14
#define MUTATOR_HOOKABLE(id, params)
Definition base.qh:129
#define EV_Skeleton_CheckModel(i, o)
Called when setting up bones from the loaded model.
Definition events.qh:75
#define EV_DamageInfo(i, o)
Called when damage info is received on the client, useful for playing explosion effects.
Definition events.qh:224
#define EV_GetModelParams(i, o)
Called when getting the global parameters for a model.
Definition events.qh:84
#define EV_DrawGrapplingHook(i, o)
Draw the grapple hook, allows changing hook texture and colour.
Definition events.qh:155
#define EV_EditProjectile(i, o)
Called when a projectile's properties are being modified.
Definition events.qh:48
#define EV_ShowNames_Draw(i, o)
Called when drawing a player's nameplate, return true to hide it.
Definition events.qh:241
#define EV_AnnouncerOption(i, o)
Definition events.qh:105
#define EV_ForcePlayercolors_Skip(i, o)
Return true to disable player color forcing.
Definition events.qh:217
#define EV_Weapon_ImpactEffect(i, o)
Return true to not draw any impact effect.
Definition events.qh:141
#define EV_DrawInfoMessages(i, o)
Called when drawing info messages, allows adding new info messages.
Definition events.qh:191
#define EV_Skeleton_CheckBones(i, o)
Called when setting up skeleton bones.
Definition events.qh:69
#define EV_WantEventchase(i, o)
Called checking if 3rd person mode should be forced on.
Definition events.qh:91
#define EV_CSQC_ConsoleCommand(i, o)
Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return fa...
Definition events.qh:31
#define EV_HUD_Command(i, o)
Definition events.qh:149
#define EV_Particles_VortexBeam(i, o)
Return true to not draw any vortex beam.
Definition events.qh:134
#define EV_CustomizeEventchase(i, o)
allow customizing 3rd person mode effect
Definition events.qh:97
#define EV_Ent_Update(i, o)
Called when an entity is updated (either by SVQC networking or PVS)
Definition events.qh:166
#define EV_TagIndex_Apply(i, o)
Called when setting the attached tags.
Definition events.qh:63
#define EV_HUD_Draw_overlay(i, o)
Definition events.qh:113
#define EV_DrawViewModel(i, o)
Called when the view model is being animated (setorigin is called after the hook, so you only need to...
Definition events.qh:201
#define EV_TagIndex_Update(i, o)
Called when updating the attached tags index.
Definition events.qh:57
#define EV_ForcePlayermodels_Skip(i, o)
Return true to disable player model forcing.
Definition events.qh:210
#define EV_Ent_Projectile(i, o)
Called when a projectile is linked with CSQC.
Definition events.qh:42
#define EV_ShowRankings(i, o)
Return true to show leaderboard rankings, needs title argument set.
Definition events.qh:235
#define EV_NO_ARGS(i, o)
Definition events.qh:3
void DrawReticle(entity this)
Definition crosshair.qc:649
#define CSQC_ConsoleCommand
Definition _all.inc:309
void HUD_Contents()
Definition view.qc:1167
int WantEventchase(entity this, bool want_vehiclechase)
Definition view.qc:730