]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/throwing.qc
Add a temporary flag for weapons that penetrate walls (rifle), to avoid a direct...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / throwing.qc
index 6e40d16b80e57ca538accb5aa67b26defa8ae268..4b7d45b964157127f682e1de6048aa1bc3c358cd 100644 (file)
@@ -20,10 +20,7 @@ void thrown_wep_think(entity this)
        {
                this.SendFlags |= ISF_LOCATION;
                this.oldorigin = this.origin;
-               this.bot_pickup = false;
        }
-       else
-               this.bot_pickup = true;
        this.owner = NULL;
        float timeleft = this.savenextthink - time;
        if(timeleft > 1)
@@ -50,6 +47,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
        wep.flags |= FL_TOSSED;
        wep.colormap = own.colormap;
        wep.glowmod = weaponentity_glowmod(info, own, own.clientcolors, own.(weaponentity));
+       navigation_dynamicgoal_init(wep, false);
 
        W_DropEvent(wr_drop,own,wpn,wep,weaponentity);
 
@@ -62,10 +60,10 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
                else
                {
                        int superweapons = 1;
-                       FOREACH(Weapons, it != WEP_Null, LAMBDA(
+                       FOREACH(Weapons, it != WEP_Null, {
                                WepSet set = it.m_wepset;
                                if((set & WEPSET_SUPERWEAPONS) && (own.weapons & set)) ++superweapons;
-                       ));
+                       });
                        if(superweapons <= 1)
                        {
                                wep.superweapons_finished = own.superweapons_finished;
@@ -148,8 +146,6 @@ bool W_IsWeaponThrowable(entity this, int w)
                return false;
        if (g_weaponarena)
                return 0;
-       if (g_cts)
-               return 0;
     if(w == WEP_Null.m_id)
         return false;