From 56149e2ca2112a82af5213d1f38f2b6bbe77afdf Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 13 Nov 2014 22:00:01 +1100 Subject: [PATCH] Use old flight (jetpack) if buffs are disabled --- qcsrc/common/buffs.qh | 1 - qcsrc/server/t_quake3.qc | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/buffs.qh b/qcsrc/common/buffs.qh index 2beea209c..c29dad6dd 100644 --- a/qcsrc/common/buffs.qh +++ b/qcsrc/common/buffs.qh @@ -79,7 +79,6 @@ BUFF_SPAWNFUNC_Q3TA_COMPAT(scout, BUFF_SPEED) BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen, BUFF_AMMO) // actually Q3 -BUFF_SPAWNFUNC_Q3TA_COMPAT(flight, BUFF_FLIGHT) BUFF_SPAWNFUNC_Q3TA_COMPAT(haste, BUFF_SPEED) BUFF_SPAWNFUNC_Q3TA_COMPAT(invis, BUFF_INVISIBLE) BUFF_SPAWNFUNC_Q3TA_COMPAT(medic, BUFF_MEDIC) diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 5a1885588..86a87c043 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -114,7 +114,7 @@ void spawnfunc_target_give() InitializeEntity(self, target_give_init, INITPRIO_FINDTARGET); } -//void spawnfunc_item_flight() /* handled by buffs mutator */ +//void spawnfunc_item_flight() /* handled by buffs mutator or jetpack */ //void spawnfunc_item_haste() /* handled by buffs mutator */ //void spawnfunc_item_health() /* handled in t_quake.qc */ //void spawnfunc_item_health_large() /* handled in t_items.qc */ @@ -125,7 +125,13 @@ void spawnfunc_target_give() // CTF spawnfuncs handled in mutators/gamemode_ctf.qc now -//void spawnfunc_item_flight() { spawnfunc_item_jetpack(); } +void spawnfunc_item_flight() +{ + if(!cvar("g_buffs") || !cvar("g_buffs_flight")) + spawnfunc_item_jetpack(); + else + buff_Init_Compat(self, BUFF_FLIGHT); +} .float notteam; .float notsingle; -- 2.39.2