]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use old flight (jetpack) if buffs are disabled
authorMario <zacjardine@y7mail.com>
Thu, 13 Nov 2014 11:00:01 +0000 (22:00 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 13 Nov 2014 11:00:01 +0000 (22:00 +1100)
qcsrc/common/buffs.qh
qcsrc/server/t_quake3.qc

index 2beea209c476a99aeac56a0e0f942fae62b9fcff..c29dad6dddbc49ce5d467fe5fa0be34d3fb8b9c8 100644 (file)
@@ -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)
index 5a1885588f1ce6a893cf6391b0b6e15fee1f43ca..86a87c043d1fd5b781c13201bdb6d242435286b0 100644 (file)
@@ -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;