X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fweapons%2Fselection.qc;h=693d5a240456323adab1c259b51dfb2551275386;hb=d865de7a9a17c5a1d9286aec40f68c3530697660;hp=791d65915be989f9982b9d080024a860d13fab43;hpb=7e474d576080259e21690de30778b17029b5c0f2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index 791d65915..693d5a240 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -2,6 +2,7 @@ #include "weaponsystem.qh" #include +#include #include #include #include @@ -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, @@ -290,7 +293,7 @@ void W_CycleWeapon(entity this, string weaponorder, float dir, .entity weaponent void W_NextWeaponOnImpulse(entity this, float imp, .entity weaponentity) { float w; - w = W_GetCycleWeapon(this, this.cvar_cl_weaponpriority, +1, imp, 1, (CS(this).cvar_cl_weaponimpulsemode == 0), weaponentity); + w = W_GetCycleWeapon(this, CS(this).cvar_cl_weaponpriority, +1, imp, 1, (CS(this).cvar_cl_weaponimpulsemode == 0), weaponentity); if(w > 0) W_SwitchWeapon(this, Weapons_from(w), weaponentity); } @@ -303,7 +306,7 @@ void W_NextWeapon(entity this, int list, .entity weaponentity) else if(list == 1) W_CycleWeapon(this, this.weaponorder_byimpulse, -1, weaponentity); else if(list == 2) - W_CycleWeapon(this, this.cvar_cl_weaponpriority, -1, weaponentity); + W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, -1, weaponentity); } // prev weapon @@ -314,7 +317,7 @@ void W_PreviousWeapon(entity this, float list, .entity weaponentity) else if(list == 1) W_CycleWeapon(this, this.weaponorder_byimpulse, +1, weaponentity); else if(list == 2) - W_CycleWeapon(this, this.cvar_cl_weaponpriority, +1, weaponentity); + W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, +1, weaponentity); } // previously used if exists and has ammo, (second) best otherwise