From c0addaeedd1ee9d279e6225d88104b40502ae391 Mon Sep 17 00:00:00 2001 From: TimePath Date: Tue, 10 Nov 2015 16:25:34 +1100 Subject: [PATCH] Buffs: move definitions alongside buff mutator --- qcsrc/client/hud/hud.qc | 1 - qcsrc/client/hud/panel/powerups.qc | 4 +- qcsrc/client/mutators/events.qh | 2 + qcsrc/client/progs.inc | 1 - qcsrc/client/t_items.qc | 1 - qcsrc/common/buffs/all.qc | 7 --- qcsrc/common/mapinfo.qc | 2 - qcsrc/common/mutators/all.inc | 5 ++- qcsrc/common/mutators/events.qh | 13 ++++++ .../{ => mutators/mutator}/buffs/all.inc | 0 qcsrc/common/mutators/mutator/buffs/all.qc | 1 + .../{ => mutators/mutator}/buffs/all.qh | 13 +++--- qcsrc/common/mutators/mutator/buffs/buffs.qc | 6 ++- .../common/mutators/mutator/buffs/module.inc | 43 +++++++++++++++++++ .../mutators/mutator/instagib/instagib.qc | 3 +- .../common/mutators/mutator/waypoints/all.inc | 2 - .../common/mutators/mutator/waypoints/all.qh | 1 - .../mutator/waypoints/waypointsprites.qc | 16 +++++-- qcsrc/common/notifications.qh | 6 ++- qcsrc/common/physics.qc | 2 +- qcsrc/common/triggers/misc/laser.qc | 1 - qcsrc/common/weapons/all.qc | 2 - qcsrc/server/g_damage.qc | 3 +- qcsrc/server/g_world.qc | 1 - qcsrc/server/mutators/all.qc | 1 - qcsrc/server/progs.inc | 1 - qcsrc/server/t_quake3.qc | 6 +-- 27 files changed, 97 insertions(+), 47 deletions(-) delete mode 100644 qcsrc/common/buffs/all.qc rename qcsrc/common/{ => mutators/mutator}/buffs/all.inc (100%) create mode 100644 qcsrc/common/mutators/mutator/buffs/all.qc rename qcsrc/common/{ => mutators/mutator}/buffs/all.qh (87%) diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 0860183a2..75e678275 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -5,7 +5,6 @@ #include "scoreboard.qh" #include "teamradar.qh" #include "t_items.qh" -#include "../common/buffs/all.qh" #include "../common/deathtypes/all.qh" #include "../common/items/all.qc" #include "../common/mapinfo.qh" diff --git a/qcsrc/client/hud/panel/powerups.qc b/qcsrc/client/hud/panel/powerups.qc index 4e509e5c5..10446d643 100644 --- a/qcsrc/client/hud/panel/powerups.qc +++ b/qcsrc/client/hud/panel/powerups.qc @@ -97,9 +97,7 @@ void HUD_Powerups() if(superTime) addPowerupItem("Superweapons", "superweapons", autocvar_hud_progressbar_superweapons_color, superTime, 30); - FOREACH(Buffs, it.m_itemid & allBuffs, LAMBDA( - addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60); - )); + MUTATOR_CALLHOOK(HUD_Powerups_add); if(!powerupItemsCount) return; diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 898d3b28a..99707105a 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -119,4 +119,6 @@ MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS); /**/ MUTATOR_HOOKABLE(HUD_Draw_overlay, EV_HUD_Draw_overlay); +MUTATOR_HOOKABLE(HUD_Powerups_add, EV_NO_ARGS); + #endif diff --git a/qcsrc/client/progs.inc b/qcsrc/client/progs.inc index e6fa30533..1e939b770 100644 --- a/qcsrc/client/progs.inc +++ b/qcsrc/client/progs.inc @@ -40,7 +40,6 @@ #include "../common/minigames/minigames.qc" #include "../common/minigames/cl_minigames.qc" -#include "../common/buffs/all.qc" #include "../common/deathtypes/all.qc" #include "../common/effects/all.qc" #include "../common/gamemodes/all.qc" diff --git a/qcsrc/client/t_items.qc b/qcsrc/client/t_items.qc index f4096b87a..b0e1315f6 100644 --- a/qcsrc/client/t_items.qc +++ b/qcsrc/client/t_items.qc @@ -1,5 +1,4 @@ -#include "../common/buffs/all.qh" #include "../common/movetypes/movetypes.qh" #include "../common/weapons/all.qh" #include "../lib/csqcmodel/cl_model.qh" diff --git a/qcsrc/common/buffs/all.qc b/qcsrc/common/buffs/all.qc deleted file mode 100644 index c6a6f49f0..000000000 --- a/qcsrc/common/buffs/all.qc +++ /dev/null @@ -1,7 +0,0 @@ -#if defined(CSQC) - #include "../../client/defs.qh" -#elif defined(MENUQC) -#elif defined(SVQC) -#endif -#include "all.qh" - diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 4f856670b..67524b83c 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1,13 +1,11 @@ #if defined(CSQC) #include "../client/defs.qh" #include "util.qh" - #include "buffs/all.qh" #include "weapons/all.qh" #include "mapinfo.qh" #elif defined(MENUQC) #elif defined(SVQC) #include "util.qh" - #include "buffs/all.qh" #include "monsters/all.qh" #include "mapinfo.qh" #endif diff --git a/qcsrc/common/mutators/all.inc b/qcsrc/common/mutators/all.inc index a262cb9bc..bef00c649 100644 --- a/qcsrc/common/mutators/all.inc +++ b/qcsrc/common/mutators/all.inc @@ -1,14 +1,15 @@ -#include "mutator/buffs/module.inc" +#include "mutator/waypoints/module.inc" + #include "mutator/itemstime.qc" #include "mutator/multijump/module.inc" #include "mutator/nades/module.inc" #include "mutator/superspec/module.inc" -#include "mutator/waypoints/module.inc" // completely self contained #include "mutator/bloodloss/module.inc" #include "mutator/breakablehook/module.inc" +#include "mutator/buffs/module.inc" #include "mutator/campcheck/module.inc" #include "mutator/cloaked/module.inc" #include "mutator/damagetext/module.inc" diff --git a/qcsrc/common/mutators/events.qh b/qcsrc/common/mutators/events.qh index bb845b801..82898237c 100644 --- a/qcsrc/common/mutators/events.qh +++ b/qcsrc/common/mutators/events.qh @@ -48,4 +48,17 @@ MUTATOR_HOOKABLE(BuildMutatorsPrettyString, EV_BuildMutatorsPrettyString); /**/ MUTATOR_HOOKABLE(BuildGameplayTipsString, EV_BuildGameplayTipsString); +#define EV_IsFlying(i, o) \ + /**/ i(entity, MUTATOR_ARGV_0_entity) \ + /**/ +MUTATOR_HOOKABLE(IsFlying, EV_IsFlying); + +#define EV_WP_Format(i, o) \ + /**/ i(entity, MUTATOR_ARGV_0_entity) \ + /**/ i(string, MUTATOR_ARGV_0_string) \ + /**/ o(vector, MUTATOR_ARGV_0_vector) \ + /**/ o(string, MUTATOR_ARGV_0_string) \ + /**/ +MUTATOR_HOOKABLE(WP_Format, EV_WP_Format); + #endif diff --git a/qcsrc/common/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc similarity index 100% rename from qcsrc/common/buffs/all.inc rename to qcsrc/common/mutators/mutator/buffs/all.inc diff --git a/qcsrc/common/mutators/mutator/buffs/all.qc b/qcsrc/common/mutators/mutator/buffs/all.qc new file mode 100644 index 000000000..b05675162 --- /dev/null +++ b/qcsrc/common/mutators/mutator/buffs/all.qc @@ -0,0 +1 @@ +#include "all.qh" diff --git a/qcsrc/common/buffs/all.qh b/qcsrc/common/mutators/mutator/buffs/all.qh similarity index 87% rename from qcsrc/common/buffs/all.qh rename to qcsrc/common/mutators/mutator/buffs/all.qh index beabaa755..5b641f7fb 100644 --- a/qcsrc/common/buffs/all.qh +++ b/qcsrc/common/mutators/mutator/buffs/all.qh @@ -5,8 +5,11 @@ // Add new buffs here! // Note: Buffs also need spawnfuncs, which are set below -#include "../teams.qh" -#include "../util.qh" +#include "../../../teams.qh" +#include "../../../util.qh" + +REGISTER_WAYPOINT(Buff, _("Buff"), '1 0.5 0', 1); +REGISTER_RADARICON(Buff, 1); REGISTRY(Buffs, BITS(4)) #define Buffs_from(i) _Buffs_from(i, BUFF_Null) @@ -22,7 +25,7 @@ REGISTRY_CHECK(Buffs) } \ REGISTER_INIT(BUFF, id) -#include "../items/item/pickup.qh" +#include "../../../items/item/pickup.qh" CLASS(Buff, Pickup) /** bit index */ ATTRIB(Buff, m_itemid, int, 0) @@ -35,8 +38,8 @@ CLASS(Buff, Pickup) returns(this.m_prettyName, sprintf("/gfx/hud/%s/buff_%s", cvar_string("menu_skin"), this.m_name)); } #ifdef SVQC - METHOD(Buff, m_time, float(entity)); - float Buff_m_time(entity this) { return cvar(strcat("g_buffs_", this.netname, "_time")); } + METHOD(Buff, m_time, float(Buff this)) + { return cvar(strcat("g_buffs_", this.netname, "_time")); } #endif ENDCLASS(Buff) diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index eeda5db74..08f1aa3b5 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -75,7 +75,6 @@ const vector BUFF_MAX = ('16 16 20'); #include "../../../triggers/target/music.qh" #include "../../../gamemodes/all.qh" -#include "../../../buffs/all.qh" .float buff_time; void buffs_DelayedInit(); @@ -789,6 +788,11 @@ MUTATOR_HOOKFUNCTION(buffs, CustomizeWaypoint) MUTATOR_HOOKFUNCTION(buffs, OnEntityPreSpawn, CBC_ORDER_LAST) {SELFPARAM(); + if (self.classname == "item_flight" && cvar("g_buffs") && cvar("g_buffs_flight")) + { + buff_Init_Compat(self, BUFF_FLIGHT); + return true; + } if(autocvar_g_buffs_replace_powerups) switch(self.classname) { diff --git a/qcsrc/common/mutators/mutator/buffs/module.inc b/qcsrc/common/mutators/mutator/buffs/module.inc index 89d31a1b3..5f24f627e 100644 --- a/qcsrc/common/mutators/mutator/buffs/module.inc +++ b/qcsrc/common/mutators/mutator/buffs/module.inc @@ -1,3 +1,46 @@ +#include "all.qc" #ifdef SVQC #include "buffs.qc" #endif + +#ifdef IMPLEMENTATION + +string BUFF_NAME(int i) +{ + Buff b = Buffs_from(i); + return sprintf("%s%s", rgb_to_hexcolor(b.m_color), b.m_prettyName); +} + +#ifndef MENUQC +REGISTER_MUTATOR(buffs_flight, true); +MUTATOR_HOOKFUNCTION(buffs_flight, IsFlying) +{ + noref entity e = MUTATOR_ARGV(0, entity); + return BUFFS_STAT(e) & BUFF_FLIGHT.m_itemid; +} +#endif + +#ifdef CSQC +REGISTER_MUTATOR(cl_buffs, true); +MUTATOR_HOOKFUNCTION(cl_buffs, HUD_Powerups_add) +{ + int allBuffs = getstati(STAT_BUFFS, 0, 24); + FOREACH(Buffs, it.m_itemid & allBuffs, LAMBDA( + addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60); + )); +} +MUTATOR_HOOKFUNCTION(cl_buffs, WP_Format) +{ + entity this = MUTATOR_ARGV(0, entity); + string s = MUTATOR_ARGV(0, string); + if (s == WP_Buff.netname || s == RADARICON_Buff.netname) + { + Buff b = Buffs_from(this.wp_extra); + MUTATOR_ARGV(0, vector) = b.m_color; + MUTATOR_ARGV(0, string) = b.m_prettyName; + return true; + } +} + +#endif +#endif diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 2a46dd699..1810734c6 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -17,7 +17,6 @@ int autocvar_g_instagib_extralives; float autocvar_g_instagib_speed_highspeed; #include "../../../../server/cl_client.qh" -#include "../../../buffs/all.qh" #include "../../../items/all.qc" @@ -333,7 +332,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate) frag_mirrordamage = 0; } - if((frag_target.buffs & BUFF_INVISIBLE.m_itemid) || (frag_target.items & ITEM_Invisibility.m_itemid)) + if(frag_target.alpha && frag_target.alpha < 1) yoda = 1; return false; diff --git a/qcsrc/common/mutators/mutator/waypoints/all.inc b/qcsrc/common/mutators/mutator/waypoints/all.inc index 47fafe7ed..c74715ea7 100644 --- a/qcsrc/common/mutators/mutator/waypoints/all.inc +++ b/qcsrc/common/mutators/mutator/waypoints/all.inc @@ -54,8 +54,6 @@ REGISTER_WAYPOINT(OnsCPAttack, _("Control point"), '1 0.5 0', 2); REGISTER_WAYPOINT(OnsGen, _("Generator"), '1 0.5 0', 1); REGISTER_WAYPOINT(OnsGenShielded, _("Generator"), '1 0.5 0', 1); -REGISTER_WAYPOINT(Buff, _("Buff"), '1 0.5 0', 1); - REGISTER_WAYPOINT(Weapon, _("Weapon"), '0 0 0', 1); REGISTER_WAYPOINT(Monster, _("Monster"), '1 0 0', 1); diff --git a/qcsrc/common/mutators/mutator/waypoints/all.qh b/qcsrc/common/mutators/mutator/waypoints/all.qh index 3769412ec..b98d28a68 100644 --- a/qcsrc/common/mutators/mutator/waypoints/all.qh +++ b/qcsrc/common/mutators/mutator/waypoints/all.qh @@ -54,7 +54,6 @@ REGISTER_RADARICON(OBJECTIVE, 1); REGISTER_RADARICON(DOMPOINT, 1); REGISTER_RADARICON(TAGGED, 1); -REGISTER_RADARICON(Buff, 1); REGISTER_RADARICON(Item, 1); REGISTER_RADARICON(Vehicle, 1); REGISTER_RADARICON(Weapon, 1); diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 7fa9181f2..a11feab9e 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -233,7 +233,10 @@ vector spritelookupcolor(entity this, string s, vector def) { if (s == WP_Weapon.netname || s == RADARICON_Weapon.netname) return get_weaponinfo(this.wp_extra).wpcolor; if (s == WP_Item.netname || s == RADARICON_Item.netname) return Items_from(this.wp_extra).m_color; - if (s == WP_Buff.netname || s == RADARICON_Buff.netname) return Buffs_from(this.wp_extra).m_color; + if (MUTATOR_CALLHOOK(WP_Format, this, s)) + { + return MUTATOR_ARGV(0, vector); + } return def; } @@ -242,8 +245,11 @@ string spritelookuptext(string s) if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start"); if (s == WP_Weapon.netname) return get_weaponinfo(self.wp_extra).m_name; if (s == WP_Item.netname) return Items_from(self.wp_extra).m_waypoint; - if (s == WP_Buff.netname) return Buffs_from(self.wp_extra).m_prettyName; if (s == WP_Monster.netname) return get_monsterinfo(self.wp_extra).monster_name; + if (MUTATOR_CALLHOOK(WP_Format, this, s)) + { + return MUTATOR_ARGV(0, string); + } // need to loop, as our netname could be one of three FOREACH(Waypoints, it.netname == s, LAMBDA( @@ -371,11 +377,13 @@ vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a, if (fabs(sa) > fabs(ca)) { algnx = (sa < 0); - algny = 0.5 - 0.5 * ca / fabs(sa); + float f = fabs(sa); + algny = 0.5 - 0.5 * (f ? (ca / f) : 0); } else { - algnx = 0.5 - 0.5 * sa / fabs(ca); + float f = fabs(ca); + algnx = 0.5 - 0.5 * (f ? (sa / f) : 0); algny = (ca < 0); } diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 18cb7ee7f..f3cd0ba49 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -284,6 +284,8 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint // todo possible idea.... declare how many floats/strings each arg needs, and then dynamically increment the input // this way, we don't need to have duplicates like i.e. s2loc and s3loc? +string BUFF_NAME(int i); + #define NOTIF_ARGUMENT_LIST \ ARG_CASE(ARG_CS_SV_HA, "s1", s1) \ ARG_CASE(ARG_CS_SV_HA, "s2", s2) \ @@ -317,8 +319,8 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint ARG_CASE(ARG_CS_SV, "spree_end", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \ ARG_CASE(ARG_CS_SV, "spree_lost", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \ ARG_CASE(ARG_CS_SV, "item_wepname", WEP_NAME(f1)) \ - ARG_CASE(ARG_CS_SV, "item_buffname", sprintf("%s%s", rgb_to_hexcolor(Buffs_from(f1).m_color), Buffs_from(f1).m_prettyName)) \ - ARG_CASE(ARG_CS_SV, "f3buffname", sprintf("%s%s", rgb_to_hexcolor(Buffs_from(f3).m_color), Buffs_from(f3).m_prettyName)) \ + ARG_CASE(ARG_CS_SV, "item_buffname", BUFF_NAME(f1)) \ + ARG_CASE(ARG_CS_SV, "f3buffname", BUFF_NAME(f3)) \ ARG_CASE(ARG_CS_SV, "item_wepammo", (s1 != "" ? sprintf(_(" with %s"), s1) : "")) \ ARG_CASE(ARG_DC, "item_centime", ftos(autocvar_notification_item_centerprinttime)) \ ARG_CASE(ARG_SV, "death_team", Team_ColoredFullName(f1)) \ diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index b01efd32b..a49f79df8 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -1819,7 +1819,7 @@ void PM_Main() RaceCarPhysics(); #endif - else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_FLY_WORLDONLY || (BUFFS_STAT(self) & BUFF_FLIGHT.m_itemid)) + else if (self.movetype == MOVETYPE_NOCLIP || self.movetype == MOVETYPE_FLY || self.movetype == MOVETYPE_FLY_WORLDONLY || MUTATOR_CALLHOOK(IsFlying, self)) PM_fly(maxspeed_mod); else if (self.waterlevel >= WATERLEVEL_SWIMMING) diff --git a/qcsrc/common/triggers/misc/laser.qc b/qcsrc/common/triggers/misc/laser.qc index a7dcd7e90..8bfa35f40 100644 --- a/qcsrc/common/triggers/misc/laser.qc +++ b/qcsrc/common/triggers/misc/laser.qc @@ -1,5 +1,4 @@ #if defined(CSQC) - #include "../../buffs/all.qh" #include "../../../lib/csqcmodel/interpolate.qh" #include "../../../client/main.qh" #include "../../../lib/csqcmodel/cl_model.qh" diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index b33812213..452438add 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -11,7 +11,6 @@ #include "../../lib/warpzone/common.qh" #include "../../lib/warpzone/client.qh" #include "../util.qh" - #include "../buffs/all.qh" #include "../../client/autocvars.qh" #include "../deathtypes/all.qh" #include "../../lib/csqcmodel/interpolate.qh" @@ -28,7 +27,6 @@ #include "../stats.qh" #include "../teams.qh" #include "../util.qh" - #include "../buffs/all.qh" #include "../monsters/all.qh" #include "config.qh" #include "../../server/weapons/csqcprojectile.qh" diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 5d9436f68..147c03ca2 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -12,7 +12,6 @@ #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" -#include "../common/buffs/all.qh" #include "../common/constants.qh" #include "../common/deathtypes/all.qh" #include "../common/notifications.qh" @@ -262,6 +261,8 @@ float Obituary_WeaponDeath( return false; } +.int buffs; // TODO: remove + void Obituary(entity attacker, entity inflictor, entity targ, int deathtype) { // Sanity check diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 16a78fd6d..85f1ce163 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -18,7 +18,6 @@ #include "scores.qh" #include "teamplay.qh" #include "weapons/weaponstats.qh" -#include "../common/buffs/all.qh" #include "../common/constants.qh" #include "../common/deathtypes/all.qh" #include "../common/mapinfo.qh" diff --git a/qcsrc/server/mutators/all.qc b/qcsrc/server/mutators/all.qc index f2d8a084c..3520953ba 100644 --- a/qcsrc/server/mutators/all.qc +++ b/qcsrc/server/mutators/all.qc @@ -9,7 +9,6 @@ #include "../../common/stats.qh" #include "../../common/teams.qh" #include "../../common/util.qh" - #include "../../common/buffs/all.qh" #include "../../common/command/markup.qh" #include "../../common/command/rpn.qh" #include "../../common/command/generic.qh" diff --git a/qcsrc/server/progs.inc b/qcsrc/server/progs.inc index e9dc04793..08a9d4d22 100644 --- a/qcsrc/server/progs.inc +++ b/qcsrc/server/progs.inc @@ -73,7 +73,6 @@ #include "../common/viewloc.qc" #include "../common/deathtypes/all.qc" -#include "../common/buffs/all.qc" #include "../common/effects/all.qc" #include "../common/gamemodes/all.qc" #include "../common/items/all.qc" diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 94663fc36..82646da26 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -1,6 +1,5 @@ #include "../common/weapons/all.qh" -#include "../common/buffs/all.qh" spawnfunc(weapon_crylink); spawnfunc(weapon_electro); @@ -155,10 +154,7 @@ spawnfunc(target_give) spawnfunc(item_flight) { - if(!cvar("g_buffs") || !cvar("g_buffs_flight")) - spawnfunc_item_jetpack(this); - else - buff_Init_Compat(self, BUFF_FLIGHT); + spawnfunc_item_jetpack(this); } .float notteam; -- 2.39.2