]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'DefaultUser/m_itemid' into 'master'
authorMario <zacjardine@y7mail.com>
Fri, 11 Nov 2016 10:51:58 +0000 (10:51 +0000)
committerMario <zacjardine@y7mail.com>
Fri, 11 Nov 2016 10:51:58 +0000 (10:51 +0000)
Replace m_itemid references with itemdef references where possible

See merge request !386

1  2 
qcsrc/common/mutators/mutator/melee_only/sv_melee_only.qc

index 5bd896ea279fc3178b1f5c3a7c1cdbda94441bbe,b7b16007592efd06a38ce822743f1dccf33a3d93..a542921221a6a37bc7bddf4bb485f26fdcbd8d08
@@@ -8,12 -8,6 +8,12 @@@ MUTATOR_HOOKFUNCTION(melee_only, SetSta
        start_weapons = warmup_start_weapons = WEPSET(SHOTGUN);
  }
  
 +MUTATOR_HOOKFUNCTION(melee_only, SetWeaponArena)
 +{
 +      // turn weapon arena off
 +      M_ARGV(0, string) = "off";
 +}
 +
  MUTATOR_HOOKFUNCTION(melee_only, ForbidThrowCurrentWeapon)
  {
        return true;
@@@ -23,10 -17,10 +23,10 @@@ MUTATOR_HOOKFUNCTION(melee_only, Filter
  {
        entity item = M_ARGV(0, entity);
  
-       switch (item.items)
+       switch (item.itemdef)
        {
-               case ITEM_HealthSmall.m_itemid:
-               case ITEM_ArmorSmall.m_itemid:
+               case ITEM_HealthSmall:
+               case ITEM_ArmorSmall:
                        return false;
        }