]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/base.qh
Merge branch 'master' into Mario/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / base.qh
index 893ebb301ff439ffbed18757f6da29cc95cf92b8..4ee54f0493468291e82e1b4c89b98b46c2c23520 100644 (file)
@@ -103,7 +103,7 @@ MUTATOR_HOOKABLE(ForbidThrowCurrentWeapon);
        // returns 1 if throwing the current weapon shall not be allowed
 
 MUTATOR_HOOKABLE(SetStartItems);
-       // adjusts {warmup_}start_{items,weapons,ammo_{cells,rockets,nails,shells,fuel}}
+       // adjusts {warmup_}start_{items,weapons,ammo_{cells,plasma,rockets,nails,shells,fuel}}
 
 MUTATOR_HOOKABLE(BuildMutatorsString);
        // appends ":mutatorname" to ret_string for logging
@@ -152,6 +152,43 @@ MUTATOR_HOOKABLE(EditProjectile);
        // INPUT:
                entity self;
                entity other;
+        
+MUTATOR_HOOKABLE(MonsterSpawn);
+       // called when a monster spawns
+    
+MUTATOR_HOOKABLE(MonsterDies);
+       // called when a monster dies
+       // INPUT:
+               entity frag_attacker;
+               
+MUTATOR_HOOKABLE(MonsterRespawn);
+       // called when a monster wants to respawn
+       // INPUT:
+               entity other;
+               
+MUTATOR_HOOKABLE(MonsterDropItem);
+       // called when a monster is dropping loot
+       // INPUT, OUTPUT:
+               .void() monster_loot;
+               entity other;
+       
+MUTATOR_HOOKABLE(MonsterMove);
+       // called when a monster moves
+       // returning TRUE makes the monster stop
+       // INPUT:
+               float monster_speed_run;
+               float monster_speed_walk;
+               entity monster_target;
+    
+MUTATOR_HOOKABLE(MonsterFindTarget);
+       // called when a monster looks for another target
+    
+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.
@@ -182,6 +219,10 @@ MUTATOR_HOOKABLE(PlayerPowerups);
        entity self;
        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
+
 MUTATOR_HOOKABLE(PlayerUseKey);
        // called when the use key is pressed
        // if MUTATOR_RETURNVALUE is 1, don't do anything
@@ -312,5 +353,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