]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/throwing.qc
Merge branch 'master' into martin-t/defaults
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / throwing.qc
index ba84b14c50d11ea9ebb657e8b5465c25e5d210b2..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;
 
@@ -194,9 +190,9 @@ void W_ThrowWeapon(entity this, .entity weaponentity, vector velo, vector delta,
        Send_Notification(NOTIF_ONE, this, MSG_MULTI, ITEM_WEAPON_DROP, a, w.m_id);
 }
 
-void SpawnThrownWeapon(entity this, vector org, float w, .entity weaponentity)
+void SpawnThrownWeapon(entity this, vector org, Weapon wep, .entity weaponentity)
 {
-       entity wep = this.(weaponentity).m_weapon;
+       //entity wep = this.(weaponentity).m_weapon;
 
        if(this.weapons & WepSet_FromWeapon(wep))
                if(W_IsWeaponThrowable(this, wep.m_id))