]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_quake3.qc
weapons: fix being able to switch to no weapon
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_quake3.qc
index c8f595761d0b6e03ad911b66cb6f1c7080f1b82a..88e9c2a666688e53402150b5307beb254ed4d563 100644 (file)
@@ -1,7 +1,5 @@
-#include "_all.qh"
 
 #include "../common/weapons/all.qh"
-#include "../common/buffs/all.qh"
 
 spawnfunc(weapon_crylink);
 spawnfunc(weapon_electro);
@@ -65,6 +63,9 @@ spawnfunc(item_armor_combat)   { spawnfunc_item_armor_big(this);      }
 spawnfunc(item_armor_shard)    { spawnfunc_item_armor_small(this);    }
 spawnfunc(item_enviro)         { spawnfunc_item_invincible(this);     }
 
+.float wait;
+.float delay;
+
 // weapon remove ent from df
 void target_init_verify()
 {
@@ -127,7 +128,7 @@ void target_give_init()
                else if (targ.classname == "item_health_mega")
                        self.health = 200;
                //remove(targ); // removing ents in init functions causes havoc, workaround:
-        targ.think = SUB_Remove;
+        targ.think = SUB_Remove_self;
         targ.nextthink = time;
        }
        self.spawnflags = 2;
@@ -153,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;