]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
Merge branch 'master' into martin-t/okc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index f1fe312b33089a6fb910ebde0ab3c3d2106262ce..c19f303a6be66d9396f55d988d459d5132effa56 100644 (file)
@@ -725,7 +725,7 @@ float Item_GiveTo(entity item, entity player)
        // if the player is using their best weapon before items are given, they
        // probably want to switch to an even better weapon after items are given
 
-       if(player.autoswitch)
+       if(CS(player).autoswitch)
        {
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
@@ -1753,7 +1753,7 @@ float GiveItems(entity e, float beginarg, float endarg)
 
        int _switchweapon = 0;
 
-       if(e.autoswitch)
+       if(CS(e).autoswitch)
        {
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {