]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_quake3.qc
A few simple optimizations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_quake3.qc
index 7f8cb82921ee3ae2a3b068ac331bbff891a13949..86a87c043d1fd5b781c13201bdb6d242435286b0 100644 (file)
@@ -114,18 +114,24 @@ void spawnfunc_target_give()
        InitializeEntity(self, target_give_init, INITPRIO_FINDTARGET);
 }
 
-//void spawnfunc_item_flight()       /* not supported */
-//void spawnfunc_item_haste()        /* not supported */
+//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 */
 //void spawnfunc_item_health_small() /* handled in t_items.qc */
 //void spawnfunc_item_health_mega()  /* handled in t_items.qc */
-//void spawnfunc_item_invis()        /* not supported */
-//void spawnfunc_item_regen()        /* not supported */
+//void spawnfunc_item_invis()        /* handled by buffs mutator */
+//void spawnfunc_item_regen()        /* handled by buffs mutator */
 
 // 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;
@@ -142,7 +148,7 @@ float DoesQ3ARemoveThisEntity()
                        return 1;
 
        if(self.notta)
-               if not(!teamplay || g_tdm || g_ctf)
+               if (!(!teamplay || g_tdm || g_ctf))
                        return 1;
 
        if(self.notsingle)
@@ -164,8 +170,6 @@ float DoesQ3ARemoveThisEntity()
                gametypename = "ffa";
                if(teamplay)
                        gametypename = "team";
-               if(g_arena)
-                       gametypename = "tournament";
                if(g_ctf)
                        gametypename = "ctf";
                if(maxclients == 1)