X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fbase.qh;h=05a5187e508709528c16cee43e7938027fb64d5b;hb=890c0a82cb8b8a27b52c5e39bbf94f803900c8b3;hp=974e1a4c5764ab3268dcf2612e4eacd017f85456;hpb=a60cee16752e5abd387f6b7cd7d826b4f0321d05;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/base.qh b/qcsrc/server/mutators/base.qh index 974e1a4c5..05a5187e5 100644 --- a/qcsrc/server/mutators/base.qh +++ b/qcsrc/server/mutators/base.qh @@ -16,11 +16,12 @@ float CallbackChain_Call(entity cb); #define MUTATOR_REMOVING 0 #define MUTATOR_ADDING 1 -float Mutator_Add(float(float) func); -void Mutator_Remove(float(float) func); // calls error() on fail +typedef float(float) mutatorfunc_t; +float Mutator_Add(mutatorfunc_t func, string name); +void Mutator_Remove(mutatorfunc_t func, string name); // calls error() on fail -#define MUTATOR_ADD(name) Mutator_Add(MUTATOR_##name) -#define MUTATOR_REMOVE(name) Mutator_Remove(MUTATOR_##name) +#define MUTATOR_ADD(name) Mutator_Add(MUTATOR_##name, #name) +#define MUTATOR_REMOVE(name) Mutator_Remove(MUTATOR_##name, #name) #define MUTATOR_DEFINITION(name) float MUTATOR_##name(float mode) #define MUTATOR_DECLARATION(name) float MUTATOR_##name(float mode) #define MUTATOR_HOOKFUNCTION(name) float HOOKFUNCTION_##name() @@ -94,6 +95,10 @@ MUTATOR_HOOKABLE(FilterItem); // checks if the current item may be spawned (self.items and self.weapons may be read and written to, as well as the ammo_ fields) // return error to request removal +MUTATOR_HOOKABLE(TurretSpawn); + // return error to request removal + // INPUT: self - turret + MUTATOR_HOOKABLE(OnEntityPreSpawn); // return error to prevent entity spawn, or modify the entity @@ -136,6 +141,7 @@ MUTATOR_HOOKABLE(PlayerDamage_Calculate); // INPUT: entity frag_attacker; entity frag_target; + float frag_deathtype; // INPUT, OUTPUT: float frag_damage; vector frag_force; @@ -144,4 +150,4 @@ MUTATOR_HOOKABLE(PlayerPowerups); // called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items. // INPUT entity self; - float olditems; // also technically output, but since it is at the end of the function it's useless for that :P \ No newline at end of file + float olditems; // also technically output, but since it is at the end of the function it's useless for that :P