From: TimePath Date: Sat, 19 Dec 2015 06:19:08 +0000 (+1100) Subject: weapons: fix weapon list icons. closes #1610 X-Git-Tag: xonotic-v0.8.2~1474 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fb3f5c3bd528d2057d101706a9a72c5135558f78;p=xonotic%2Fxonotic-data.pk3dir.git weapons: fix weapon list icons. closes #1610 --- diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 929564c3e..954c55473 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -39,7 +39,6 @@ STATIC_INIT(WeaponPickup) { FOREACH(Weapons, true, LAMBDA(it.m_pickup = NEW(Weap #define WEPSET(id) (WEP_##id.m_wepset) #define WepSet_FromWeapon(it) ((it).m_wepset) WepSet _WepSet_FromWeapon(int i); -STATIC_INIT(WepSets) { FOREACH(Weapons, true, LAMBDA(it.m_wepset = _WepSet_FromWeapon(it.m_id))); } GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt") // WEAPONTODO: make this work with other progs than just server { @@ -301,8 +300,7 @@ REGISTRY_CHECK(Weapons) STATIC_INIT(register_weapons_done) { FOREACH(Weapons, true, LAMBDA( - it.m_id = i; - WepSet set = it.m_wepset; + WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i); WEPSET_ALL |= set; if ((it.spawnflags) & WEP_FLAG_SUPERWEAPON) WEPSET_SUPERWEAPONS |= set; it.weapons = set;