]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to disable dropping of buffs with the use key
authorMario <mario@smbclan.net>
Thu, 9 Feb 2017 12:38:54 +0000 (22:38 +1000)
committerMario <mario@smbclan.net>
Thu, 9 Feb 2017 12:38:54 +0000 (22:38 +1000)
mutators.cfg
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qh

index 9868c9a221f7ea2e38a2f050a28b6351acda1e63..c272b5bd612f78e4e99c37d5f054f26f89902dc7 100644 (file)
@@ -299,6 +299,7 @@ set g_buffs_random_location 0 "randomize buff location on start and when reset"
 set g_buffs_random_location_attempts 10 "number of random locations a single buff will attempt to respawn at before giving up"
 set g_buffs_spawn_count 0 "how many buffs to spawn on the map if none exist already"
 set g_buffs_replace_powerups 0 "replace powerups on the map with random buffs"
+set g_buffs_drop 1 "allow dropping buffs"
 set g_buffs_cooldown_activate 5 "cooldown period when buff is first activated"
 set g_buffs_cooldown_respawn 3 "cooldown period when buff is reloading"
 set g_buffs_ammo 1 "ammo buff: infinite ammunition"
index b458f735e1301108cab62f6fdf9ea5f3e9f363eb..c02ac5687ea5664ec4a1b0498b067d3b9d3cbdc4 100644 (file)
@@ -629,7 +629,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDies)
 
 MUTATOR_HOOKFUNCTION(buffs, PlayerUseKey, CBC_ORDER_FIRST)
 {
-       if(MUTATOR_RETURNVALUE || game_stopped) return;
+       if(MUTATOR_RETURNVALUE || game_stopped || !autocvar_g_buffs_drop) return;
 
        entity player = M_ARGV(0, entity);
 
index b26d51ce2779b92663391a651183e6358db50555..4d9f107af794270f54a2beddddf23b26740a4d09 100644 (file)
@@ -14,6 +14,7 @@ bool autocvar_g_buffs_random_location;
 int autocvar_g_buffs_random_location_attempts;
 int autocvar_g_buffs_spawn_count;
 bool autocvar_g_buffs_replace_powerups;
+bool autocvar_g_buffs_drop = true;
 float autocvar_g_buffs_cooldown_activate;
 float autocvar_g_buffs_cooldown_respawn;
 float autocvar_g_buffs_resistance_blockpercent;