X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fammo.qc;fp=qcsrc%2Fclient%2Fhud%2Fpanel%2Fammo.qc;h=1f748d5427f7129c98b74765baddd6d4ff4fdfc7;hb=dfbe194424c48f310c0bc891c058bce6b03e9212;hp=0cc1f23956aa417f554c186183ff2f0438d6f53d;hpb=efd282cf0e935bc54c17ad530a879c86c75a3a5e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/ammo.qc b/qcsrc/client/hud/panel/ammo.qc index 0cc1f2395..1f748d542 100644 --- a/qcsrc/client/hud/panel/ammo.qc +++ b/qcsrc/client/hud/panel/ammo.qc @@ -218,16 +218,13 @@ void HUD_Ammo() else { row = column = 0; - // disabling new-style loop for now to restore original order of ammo types - //FOREACH(Resources, it.instanceOfAmmoResource && !it.m_hidden, - for(int j = 0; j < AMMO_COUNT; ++j) + IL_EACH(default_order_resources, it.instanceOfAmmoResource && !it.m_hidden, { - Resource ammotype = GetAmmoTypeFromNum(j); DrawAmmoItem( pos + vec2(column * (ammo_size.x + offset.x), row * (ammo_size.y + offset.y)), ammo_size, - ammotype, - (wep.ammo_type == ammotype), + it, + (wep.ammo_type == it), infinite_ammo ); @@ -237,7 +234,7 @@ void HUD_Ammo() row = 0; column = column + 1; } - } + }); } if (draw_nades)