From: Mario Date: Thu, 13 Nov 2014 11:00:01 +0000 (+1100) Subject: Use old flight (jetpack) if buffs are disabled X-Git-Tag: xonotic-v0.8.0~171^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56149e2ca2112a82af5213d1f38f2b6bbe77afdf;p=xonotic%2Fxonotic-data.pk3dir.git Use old flight (jetpack) if buffs are disabled --- 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;