]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/base.qh
Merge branch 'master' into Mario/buffs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / base.qh
index 8409a4be5a62026189deca1fe4e3be0167a331de..f4021eb4c0a45b33a2f2741363ea50d36cc68848 100644 (file)
@@ -72,11 +72,12 @@ MUTATOR_HOOKABLE(PlayerDies);
                entity frag_attacker;
                entity frag_target; // same as self
                float frag_deathtype;
-               
+
 MUTATOR_HOOKABLE(PlayerJump);
        // called when a player presses the jump key
        // INPUT, OUTPUT:
                float player_multijump;
+               float player_jumpheight;
 
 MUTATOR_HOOKABLE(GiveFragsForKill);
        // called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill
@@ -102,6 +103,11 @@ MUTATOR_HOOKABLE(SpectateCopy);
 MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon);
        // returns 1 if throwing the current weapon shall not be allowed
 
+MUTATOR_HOOKABLE(WeaponRateFactor);
+       // allows changing attack rate
+       // INPUT, OUTPUT:
+               float weapon_rate;
+
 MUTATOR_HOOKABLE(SetStartItems);
        // adjusts {warmup_}start_{items,weapons,ammo_{cells,rockets,nails,shells,fuel}}
 
@@ -114,7 +120,7 @@ MUTATOR_HOOKABLE(BuildMutatorsPrettyString);
        // appends ", Mutator name" to ret_string for display
        // INPUT, OUTPUT:
                string ret_string;
-               
+
 MUTATOR_HOOKABLE(CustomizeWaypoint);
        // called every frame
        // customizes the waypoint for spectators
@@ -127,17 +133,7 @@ MUTATOR_HOOKABLE(FilterItem);
 MUTATOR_HOOKABLE(TurretSpawn);
        // return error to request removal
        // INPUT: self - turret
-       
-MUTATOR_HOOKABLE(TurretDies);
-       // called when a turret dies
-       
-MUTATOR_HOOKABLE(TurretValidateTarget);
-       // return target score
-       // INPUT:
-               entity turret_target;
-               entity turret;
-               float turret_flags;
-       
+
 MUTATOR_HOOKABLE(OnEntityPreSpawn);
        // return error to prevent entity spawn, or modify the entity
 
@@ -196,6 +192,10 @@ MUTATOR_HOOKABLE(MonsterFindTarget);
 MUTATOR_HOOKABLE(MonsterCheckBossFlag);
     // called to change a random monster to a miniboss
 
+MUTATOR_HOOKABLE(AllowMobSpawning);
+       // called when a player tries to spawn a monster
+       // return 1 to prevent spawning
+
 MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor);
        // called when a player gets damaged to e.g. remove stuff he was carrying.
        // INPUT:
@@ -206,7 +206,7 @@ MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor);
        // INPUT, OUTPUT:
                float damage_take;
                float damage_save;
-               
+
 MUTATOR_HOOKABLE(PlayerDamage_Calculate);
        // called to adjust damage and force values which are applied to the player, used for e.g. strength damage/force multiplier
        // i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
@@ -223,7 +223,16 @@ 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 
+       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P
+
+MUTATOR_HOOKABLE(PlayerRegen);
+       // called every player think frame
+       // return 1 to disable regen
+       // INPUT, OUTPUT:
+               float regen_mod_max;
+               float regen_mod_regen;
+               float regen_mod_rot;
+               float regen_mod_limit;
 
 MUTATOR_HOOKABLE(PlayerUseKey);
        // called when the use key is pressed
@@ -274,7 +283,7 @@ MUTATOR_HOOKABLE(SV_StartFrame);
 MUTATOR_HOOKABLE(SetModname);
        // OUT
        string modname; // name of the mutator/mod if it warrants showing as such in the server browser
-       
+
 MUTATOR_HOOKABLE(Item_Spawn);
        // called for each item being spawned on a map, including dropped weapons
        // return 1 to remove an item
@@ -287,13 +296,13 @@ MUTATOR_HOOKABLE(SetWeaponreplace);
                entity other; // weapon info
        // IN+OUT
                string ret_string;
-               
+
 MUTATOR_HOOKABLE(Item_RespawnCountdown);
        // called when an item is about to respawn
        // INPUT+OUTPUT:
        string item_name;
        vector item_color;
-               
+
 MUTATOR_HOOKABLE(BotShouldAttack);
        // called when a bot checks a target to attack
        // INPUT
@@ -304,7 +313,7 @@ MUTATOR_HOOKABLE(PortalTeleport);
        // allows you to strip a player of an item if they go through the teleporter to help prevent cheating
        // INPUT
        entity self;
-       
+
 MUTATOR_HOOKABLE(HelpMePing);
        // called whenever a player uses impulse 33 (help me) in cl_impulse.qc
        // normally help me ping uses self.waypointsprite_attachedforcarrier,
@@ -312,32 +321,32 @@ MUTATOR_HOOKABLE(HelpMePing);
        // in a special manner using this hook
        // INPUT
        entity self; // the player who pressed impulse 33
-       
+
 MUTATOR_HOOKABLE(VehicleSpawn);
        // called when a vehicle initializes
        // return TRUE to remove the vehicle
-       
+
 MUTATOR_HOOKABLE(VehicleEnter);
        // called when a player enters a vehicle
        // allows mutators to set special settings in this event
        // INPUT
        entity vh_player; // player
        entity vh_vehicle; // vehicle
-       
+
 MUTATOR_HOOKABLE(VehicleTouch);
        // called when a player touches a vehicle
        // return TRUE to stop player from entering the vehicle
        // INPUT
        entity self; // vehicle
        entity other; // player
-       
+
 MUTATOR_HOOKABLE(VehicleExit);
        // called when a player exits a vehicle
        // allows mutators to set special settings in this event
        // INPUT
        entity vh_player; // player
        entity vh_vehicle; // vehicle
-       
+
 MUTATOR_HOOKABLE(AbortSpeedrun);
        // called when a speedrun is aborted and the player is teleported back to start position
        // INPUT
@@ -355,5 +364,13 @@ MUTATOR_HOOKABLE(ClientConnect);
        // called at when a player connect
        entity self;    // player
 
-MUTATOR_HOOKABLE(HavocBot_ChooseRule);
+MUTATOR_HOOKABLE(HavocBot_ChooseRole);
        entity self;
+
+MUTATOR_HOOKABLE(AccuracyTargetValid);
+       // called when a target is checked for accuracy
+       entity frag_attacker; // attacker
+       entity frag_target; // target
+       #define MUT_ACCADD_VALID 0 // return this flag to make the function continue if target is a client
+       #define MUT_ACCADD_INVALID 1 // return this flag to make the function always continue
+       #define MUT_ACCADD_INDIFFERENT 2 // return this flag to make the function always return