Xonotic
|
#include "events.qh"
Go to the source code of this file.
Classes | |
class | Callback |
Callbacks may be added to zero or more callback chains. More... | |
class | CallbackChain |
Callback chains contain zero or more callbacks. More... | |
class | CallbackChain::CallbackNode |
class | Mutator |
Macros | |
#define | _MUTATOR_CALLBACK(name, func) |
#define | _MUTATOR_CALLHOOK(id, ...) APPLY(__Mutator_Send_##id, 0 P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__)) |
#define | _MUTATOR_HANDLE_NOP(type, id) |
#define | _MUTATOR_HANDLE_PARAMS(type, id) , type in_##id |
#define | _MUTATOR_HANDLE_POPOUT(type, id) id = out_##id; |
#define | _MUTATOR_HANDLE_POPTMP(type, id) id = tmp_##id; |
#define | _MUTATOR_HANDLE_PREPARE(type, id) id = in_##id; |
#define | _MUTATOR_HANDLE_PUSHOUT(type, id) type out_##id = id; |
#define | _MUTATOR_HANDLE_PUSHTMP(type, id) TC(type, id); type tmp_##id = id; |
#define | _MUTATOR_HOOKABLE(id, params) |
#define | _MUTATOR_IS_ENABLED(this) this.mutatorcheck() |
#define | EVAL_MUTATOR_HOOKFUNCTION(...) __VA_ARGS__ |
#define | MUTATOR_ADD(name) Mutator_Add(MUTATOR_##name) |
#define | MUTATOR_CALLHOOK(id, ...) _MUTATOR_CALLHOOK(id, __VA_ARGS__) |
#define | MUTATOR_HOOK(cb, func, order) |
#define | MUTATOR_HOOKABLE(id, params) _MUTATOR_HOOKABLE(id, params) |
#define | MUTATOR_HOOKFUNCTION(...) EVAL_MUTATOR_HOOKFUNCTION(OVERLOAD(MUTATOR_HOOKFUNCTION, __VA_ARGS__)) |
#define | MUTATOR_HOOKFUNCTION_2(mut, cb) MUTATOR_HOOKFUNCTION_3(mut, cb, CBC_ORDER_ANY) |
#define | MUTATOR_HOOKFUNCTION_3(mut, cb, order) |
#define | MUTATOR_IS_ENABLED(this) _MUTATOR_IS_ENABLED(MUTATOR_##this) |
#define | MUTATOR_ONADD if (mode == MUTATOR_ADDING) |
#define | MUTATOR_ONREMOVE if (mode == MUTATOR_REMOVING) |
#define | MUTATOR_ONROLLBACK_OR_REMOVE if (mode == MUTATOR_REMOVING || mode == MUTATOR_ROLLING_BACK) |
#define | MUTATOR_REMOVE(name) Mutator_Remove(MUTATOR_##name) |
#define | MUTATOR_RETURNVALUE CallbackChain_ReturnValue |
#define | MUTATOR_STATIC() |
#define | REGISTER_MUTATOR(id, dependence) |
Typedefs | |
using | mutatorfunc_t = bool(int) |
Enumerations | |
enum | { MUTATOR_REMOVING, MUTATOR_ADDING, MUTATOR_ROLLING_BACK } |
Functions | |
void | _mutPrintFail (string cb, string func) |
bool | Mutator_Add (Mutator mut) |
void | Mutator_Remove (Mutator mut) |
void | RegisterCallbacks () |
void | RegisterHooks () |
STATIC_INIT (Mutators) | |
STATIC_INIT_LATE (Mutators) | |
Variables | |
bool | CallbackChain_ReturnValue |
const int | CBC_ORDER_ANY = 4 |
const int | CBC_ORDER_EXCLUSIVE = 3 |
const int | CBC_ORDER_FIRST = 1 |
const int | CBC_ORDER_LAST = 2 |
bool | m_added |
bool | mutator_log = false |
#define _MUTATOR_CALLBACK | ( | name, | |
func | |||
) |
#define _MUTATOR_CALLHOOK | ( | id, | |
... | |||
) | APPLY(__Mutator_Send_##id, 0 P99_IF_EMPTY(__VA_ARGS__)()(, __VA_ARGS__)) |
#define _MUTATOR_HANDLE_PUSHOUT | ( | type, | |
id | |||
) | type out_##id = id; |
#define _MUTATOR_HANDLE_PUSHTMP | ( | type, | |
id | |||
) | TC(type, id); type tmp_##id = id; |
#define _MUTATOR_HOOKABLE | ( | id, | |
params | |||
) |
#define _MUTATOR_IS_ENABLED | ( | this | ) | this.mutatorcheck() |
Definition at line 175 of file base.qh.
Referenced by STATIC_INIT_LATE().
#define MUTATOR_ADD | ( | name | ) | Mutator_Add(MUTATOR_##name) |
#define MUTATOR_CALLHOOK | ( | id, | |
... | |||
) | _MUTATOR_CALLHOOK(id, __VA_ARGS__) |
Definition at line 140 of file base.qh.
Referenced by _StartItem(), accuracy_isgooddamage(), AnnouncerOption(), AppendItemcodes(), bot_fixcount(), bot_shouldattack(), buff_Touch(), buffs_BuffModel_Customize(), calculate_player_respawn_time(), CheatImpulse(), CheckRules_World(), ClientCommand_spectate(), ClientConnect(), ClientDisconnect(), ClientInit_SendEntity(), ClientKill_Now(), ClientKill_TeamChange(), CommonCommand_editmob(), CopyBody(), CSQCModel_AutoTagIndex_Apply(), CSQCPlayer_ModelAppearance_Apply(), Damage(), DecodeLevelParms(), Draw_ShowNames(), DrawReticle(), Drop_Special_Items(), fireBullet_antilag(), FixClientCvars(), FixPlayermodel(), formatmessage(), frag_centermessage_override(), Freeze(), GameCommand(), get_model_parameters(), GetCvars(), GetPlayerLimit(), GetPressedKeys(), getrecords(), GetResourceLimit(), getwelcomemessage(), GiveFrags(), GiveResource(), GiveResourceWithLimit(), GrapplingHookThink(), havocbot_aim(), havocbot_chooserole(), HUD_Contents(), HUD_Crosshair(), HUD_Draw(), HUD_Physics(), HUD_Powerups(), HUD_RaceTimer(), HUD_Radar(), HUD_Score(), HUD_StrafeHUD(), HUD_Vote(), IMPULSE(), Item_IsDefinitionAllowed(), Item_Model(), Item_RespawnCountdown(), Item_ScheduleRespawnIn(), Item_Sound(), Item_Touch(), joinAllowed(), KillPlayerForTeamChange(), LocalCommand_hud(), M_Model(), MainWindow_configureMainWindow(), Monster_Damage(), monster_dropitem(), Monster_FindTarget(), Monster_Miniboss_Check(), Monster_Move(), Monster_Remove(), Monster_Respawn_Check(), Monster_Spawn_Setup(), Monster_ValidTarget(), MUTATOR_HOOKFUNCTION(), NET_HANDLE(), NextLevel(), Obituary(), player_powerups(), player_regen(), Player_SetTeamIndex(), PlayerDamage(), PlayerJump(), PlayerPreThink(), PlayerScore_Add(), PlayerScore_Clear(), PlayerUseKey(), PM_ClientMovement_UpdateStatus(), Portal_TeleportPlayer(), PRECACHE(), PutClientInServer(), PutObserverInServer(), PutPlayerInServer(), race_SendTime(), RandomItems_GetRandomItemClassName(), readlevelcvars(), readplayerstartcvars(), ReadyRestart(), reset_map(), Say(), Scoreboard_AccuracyStats_WouldDraw(), Scoreboard_ItemStats_WouldDraw(), Scoreboard_WouldDraw(), SetChangeParms(), SetDefaultAlpha(), SetNewParms(), SetResource(), skeleton_loadinfo(), Spawn_Score(), spawnfunc(), Spectate(), SpectateCopy(), SpectateNext(), SpectatePrev(), StartFrame(), SV_OnEntityPreSpawnFunction(), SV_ParseClientCommand(), sys_phys_update(), TakeResource(), TakeResourceWithLimit(), TeamBalance_CheckAllowedTeams(), TeamBalance_FindBestTeams(), TeamBalance_GetPlayerForTeamSwitch(), TeamBalance_GetTeamCounts(), Unfreeze(), URI_Get_Callback(), vehicle_initialize(), vehicles_enter(), vehicles_exit(), vehicles_touch(), View_EventChase(), viewmodel_draw(), VoteCommand_parse(), W_DecreaseAmmo(), W_IsWeaponThrowable(), W_Model(), W_PlayStrengthSound(), W_PrepareExplosionByDamage(), W_Reload(), W_Sound(), W_ThrowWeapon(), W_WeaponRateFactor(), W_WeaponSpeedFactor(), want_weapon(), WantEventchase(), weapon_defaultspawnfunc(), weaponLocked(), weaponUseForbidden(), and WinningCondition_Scores().
#define MUTATOR_HOOK | ( | cb, | |
func, | |||
order | |||
) |
#define MUTATOR_HOOKABLE | ( | id, | |
params | |||
) | _MUTATOR_HOOKABLE(id, params) |
#define MUTATOR_HOOKFUNCTION | ( | ... | ) | EVAL_MUTATOR_HOOKFUNCTION(OVERLOAD(MUTATOR_HOOKFUNCTION, __VA_ARGS__)) |
Definition at line 310 of file base.qh.
Referenced by GENERIC_COMMAND(), and Item_ItemsTime_Allow().
#define MUTATOR_HOOKFUNCTION_2 | ( | mut, | |
cb | |||
) | MUTATOR_HOOKFUNCTION_3(mut, cb, CBC_ORDER_ANY) |
#define MUTATOR_HOOKFUNCTION_3 | ( | mut, | |
cb, | |||
order | |||
) |
#define MUTATOR_IS_ENABLED | ( | this | ) | _MUTATOR_IS_ENABLED(MUTATOR_##this) |
Definition at line 176 of file base.qh.
Referenced by MUTATOR_HOOKFUNCTION(), player_powerups(), RandomItems_ReplaceMapItem(), and RandomItems_SpawnLootItem().
#define MUTATOR_ONADD if (mode == MUTATOR_ADDING) |
Definition at line 284 of file base.qh.
Referenced by REGISTER_MUTATOR().
#define MUTATOR_ONREMOVE if (mode == MUTATOR_REMOVING) |
Definition at line 285 of file base.qh.
Referenced by REGISTER_MUTATOR().
#define MUTATOR_ONROLLBACK_OR_REMOVE if (mode == MUTATOR_REMOVING || mode == MUTATOR_ROLLING_BACK) |
Definition at line 286 of file base.qh.
Referenced by REGISTER_MUTATOR().
#define MUTATOR_REMOVE | ( | name | ) | Mutator_Remove(MUTATOR_##name) |
#define MUTATOR_RETURNVALUE CallbackChain_ReturnValue |
Definition at line 303 of file base.qh.
Referenced by MUTATOR_HOOKFUNCTION().
#define MUTATOR_STATIC | ( | ) |
Definition at line 288 of file base.qh.
Referenced by REGISTER_MUTATOR().
#define REGISTER_MUTATOR | ( | id, | |
dependence | |||
) |
Definition at line 263 of file base.qh.
Referenced by GENERIC_COMMAND().
using mutatorfunc_t = bool(int) |
anonymous enum |
Enumerator | |
---|---|
MUTATOR_REMOVING | |
MUTATOR_ADDING | |
MUTATOR_ROLLING_BACK |
Definition at line 220 of file base.qh.
References backtrace, error(), LOG_TRACEF, MUTATOR_ADDING, and MUTATOR_ROLLING_BACK.
Referenced by Mutator::Mutator ::Mutator(), and STATIC_INIT_LATE().
Definition at line 243 of file base.qh.
References backtrace, error(), LOG_TRACEF, and MUTATOR_REMOVING.
Referenced by Mutator::Mutator ::Mutator().
void RegisterCallbacks | ( | ) |
Definition at line 124 of file base.qh.
Referenced by STATIC_INIT().
void RegisterHooks | ( | ) |
Definition at line 123 of file base.qh.
Referenced by STATIC_INIT().
STATIC_INIT | ( | Mutators | ) |
Definition at line 274 of file base.qh.
References RegisterCallbacks(), and RegisterHooks().
STATIC_INIT_LATE | ( | Mutators | ) |
Definition at line 280 of file base.qh.
References _MUTATOR_IS_ENABLED, FOREACH, and Mutator_Add().
bool CallbackChain_ReturnValue |
Definition at line 12 of file base.qh.
Referenced by CallbackChain::CallbackChain_Call().
const int CBC_ORDER_ANY = 4 |
Definition at line 10 of file base.qh.
Referenced by CallbackChain::CallbackChain_Add(), and CallbackChain::CallbackChain_Remove().
const int CBC_ORDER_FIRST = 1 |
Definition at line 7 of file base.qh.
Referenced by CallbackChain::CallbackChain_Add().
const int CBC_ORDER_LAST = 2 |
Definition at line 8 of file base.qh.
Referenced by CallbackChain::CallbackChain_Add(), and Item_ItemsTime_Allow().