]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/buffs/sv_buffs.qh
Merge branch 'terencehill/menu_registries' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / buffs / sv_buffs.qh
index 88efc94ebb298e7df9158a872a274abb22e14fce..c8281a003372bf8f909df8632c8e3f0d9323e6ee 100644 (file)
@@ -1,8 +1,20 @@
 #pragma once
 
+#include <common/mutators/base.qh>
+
 #include "buffs.qh"
 
-#include "../instagib/_mod.qh"
+void buffs_Initialize();
+
+AUTOCVAR(g_buffs, int, -1, "Enable buffs, -1: enabled but no auto location or replacing powerups, 1: enabled and can replace them");
+
+REGISTER_MUTATOR(buffs, autocvar_g_buffs)
+{
+       MUTATOR_ONADD
+       {
+               buffs_Initialize();
+       }
+}
 
 bool  autocvar_g_buffs_effects;
 float autocvar_g_buffs_waypoint_distance;
@@ -24,9 +36,6 @@ float autocvar_g_buffs_medic_survive_health;
 float autocvar_g_buffs_medic_rot;
 float autocvar_g_buffs_medic_max;
 float autocvar_g_buffs_medic_regen;
-float autocvar_g_buffs_medic_heal_amount = 15;
-float autocvar_g_buffs_medic_heal_delay = 1;
-float autocvar_g_buffs_medic_heal_range = 400;
 float autocvar_g_buffs_vengeance_damage_multiplier;
 float autocvar_g_buffs_bash_force;
 float autocvar_g_buffs_bash_force_self;
@@ -34,13 +43,7 @@ float autocvar_g_buffs_disability_slowtime;
 float autocvar_g_buffs_disability_speed;
 float autocvar_g_buffs_disability_rate;
 float autocvar_g_buffs_disability_weaponspeed;
-float autocvar_g_buffs_speed_speed;
-float autocvar_g_buffs_speed_rate;
-float autocvar_g_buffs_speed_weaponspeed;
-float autocvar_g_buffs_speed_damage_take;
-float autocvar_g_buffs_speed_regen;
 float autocvar_g_buffs_vampire_damage_steal;
-float autocvar_g_buffs_invisible_alpha;
 float autocvar_g_buffs_jump_height;
 float autocvar_g_buffs_inferno_burntime_factor;
 float autocvar_g_buffs_inferno_burntime_min_time;
@@ -56,29 +59,23 @@ float autocvar_g_buffs_luck_damagemultiplier = 3;
 // ammo
 .float buff_ammo_prev_infitems;
 .int buff_ammo_prev_clipload;
-// invisible
-.float buff_invisible_prev_alpha;
-// medic
-.float buff_medic_healtime;
-// disability
-.float buff_disability_time;
-.float buff_disability_effect_time;
 // flight
 .float buff_flight_oldgravity;
+.bool buff_flight_crouchheld;
 // common buff variables
 .float buff_effect_delay;
 
 // buff definitions
-.float buff_active;
+.bool buff_active;
 .float buff_activetime;
-.float buff_activetime_updated;
+.bool buff_activetime_updated;
 .entity buff_waypoint;
-.int oldbuffs; // for updating effects
+.entity oldbuffs; // for updating effects
 .float buff_shield; // delay for players to keep them from spamming buff pickups
 .entity buff_model; // controls effects (TODO: make csqc)
 
-const vector BUFF_MIN = ('-16 -16 0');
-const vector BUFF_MAX = ('16 16 60');
+float buff_Available(entity buff);
+
+void buff_RemoveAll(entity actor, int removal_type);
 
-// client side options
-.float cvar_cl_buffs_autoreplace;
+entity buff_FirstFromFlags(entity actor);