X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fevents.qh;h=ad97997e2f53c2f4c0d61900688d9a6416c6e84c;hb=42a9e3d7ece2c716e5cd6899e90841acb7fb891b;hp=d81b2b1a5b630c62d0edb78e5c1dd94a6cf6a418;hpb=83b19b6695a6c24a24881d72a986bb3bc2abb757;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index d81b2b1a5..ad97997e2 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -1,5 +1,4 @@ -#ifndef SERVER_MUTATORS_EVENTS_H -#define SERVER_MUTATORS_EVENTS_H +#pragma once #include @@ -127,10 +126,16 @@ string format_message; MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage); /** returns true if throwing the current weapon shall not be allowed */ -MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon, EV_NO_ARGS); +#define EV_ForbidThrowCurrentWeapon(i, o) \ + /**/ i(entity, __self) \ + /**/ +MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon, EV_ForbidThrowCurrentWeapon); /** returns true if dropping the current weapon shall not be allowed at any time including death */ -MUTATOR_HOOKABLE(ForbidDropCurrentWeapon, EV_NO_ARGS); +#define EV_ForbidDropCurrentWeapon(i, o) \ + /**/ i(entity, __self) \ + /**/ +MUTATOR_HOOKABLE(ForbidDropCurrentWeapon, EV_ForbidDropCurrentWeapon); /** */ MUTATOR_HOOKABLE(SetDefaultAlpha, EV_NO_ARGS); @@ -190,7 +195,10 @@ bool ret_bool; MUTATOR_HOOKABLE(Turret_CheckFire, EV_Turret_CheckFire); /** return error to prevent entity spawn, or modify the entity */ -MUTATOR_HOOKABLE(OnEntityPreSpawn, EV_NO_ARGS); +#define EV_OnEntityPreSpawn(i, o) \ + /** turret */ i(entity, __self) \ + /**/ +MUTATOR_HOOKABLE(OnEntityPreSpawn, EV_OnEntityPreSpawn); /** runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators */ MUTATOR_HOOKABLE(PlayerPreThink, EV_NO_ARGS); @@ -473,6 +481,7 @@ MUTATOR_HOOKABLE(Item_RespawnCountdown, EV_Item_RespawnCountdown); /** called when a bot checks a target to attack */ #define EV_BotShouldAttack(i, o) \ + /**/ i(entity, __self) \ /**/ i(entity, checkentity) \ /**/ entity checkentity; @@ -502,7 +511,10 @@ MUTATOR_HOOKABLE(HelpMePing, EV_HelpMePing); * called when a vehicle initializes * return true to remove the vehicle */ -MUTATOR_HOOKABLE(VehicleSpawn, EV_NO_ARGS); +#define EV_VehicleSpawn(i, o) \ + /**/ i(entity, __self) \ + /**/ +MUTATOR_HOOKABLE(VehicleSpawn, EV_VehicleSpawn); /** * called when a player enters a vehicle @@ -857,4 +869,3 @@ float uricb_id; float uricb_status; string uricb_data; MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback); -#endif