]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/selection.qc
Merge branch 'master' into terencehill/min_spec_time
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qc
index 776d8d8d0f43800999a3b10829cb3c9c20cc2d93..f059dfba9bccd79a97da944a5c9eaea77a98e0be 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "weaponsystem.qh"
 #include <common/t_items.qh>
+#include <server/items.qh>
 #include <common/constants.qh>
 #include <common/net_linked.qh>
 #include <common/util.qh>
@@ -25,8 +26,10 @@ void Weapon_whereis(Weapon this, entity cl)
        if (!autocvar_g_showweaponspawns) return;
        IL_EACH(g_items, it.weapon == this.m_id && (!it.team || (it.ItemStatus & ITS_AVAILABLE)),
        {
-               if (it.classname == "droppedweapon" && autocvar_g_showweaponspawns < 2)
+               if (Item_IsLoot(it) && (autocvar_g_showweaponspawns < 2))
+               {
                        continue;
+               }
                entity wp = WaypointSprite_Spawn(
                        WP_Weapon,
                        -2, 0,
@@ -301,7 +304,7 @@ void W_NextWeapon(entity this, int list, .entity weaponentity)
        if(list == 0)
                W_CycleWeapon(this, weaponorder_byid, -1, weaponentity);
        else if(list == 1)
-               W_CycleWeapon(this, this.weaponorder_byimpulse, -1, weaponentity);
+               W_CycleWeapon(this, CS(this).weaponorder_byimpulse, -1, weaponentity);
        else if(list == 2)
                W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, -1, weaponentity);
 }
@@ -312,7 +315,7 @@ void W_PreviousWeapon(entity this, float list, .entity weaponentity)
        if(list == 0)
                W_CycleWeapon(this, weaponorder_byid, +1, weaponentity);
        else if(list == 1)
-               W_CycleWeapon(this, this.weaponorder_byimpulse, +1, weaponentity);
+               W_CycleWeapon(this, CS(this).weaponorder_byimpulse, +1, weaponentity);
        else if(list == 2)
                W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, +1, weaponentity);
 }