]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/ammo.qc
Merge branch 'pending-release' into Mario/survival
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / ammo.qc
index 0cc1f23956aa417f554c186183ff2f0438d6f53d..1f748d5427f7129c98b74765baddd6d4ff4fdfc7 100644 (file)
@@ -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)