]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/throwing.qc
Merge branch 'master' into Lyberta/KillSound
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / throwing.qc
index 4114c3c58b199cc9a950c811dcf5269b0fdea807..4b7d45b964157127f682e1de6048aa1bc3c358cd 100644 (file)
@@ -47,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);
 
@@ -59,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;
@@ -145,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;
 
@@ -191,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))