aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/AchievementScreen.cpp
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-05 17:17:45 -0600
committerGitHub <noreply@github.com>2026-03-05 17:17:45 -0600
commit0666959d312dc74903f55d1071488a90239330f1 (patch)
tree5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.Client/AchievementScreen.cpp
parent9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff)
parenteed770b121aa4ce38f002db042d0137c24c6d344 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/AchievementScreen.cpp')
-rw-r--r--Minecraft.Client/AchievementScreen.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/Minecraft.Client/AchievementScreen.cpp b/Minecraft.Client/AchievementScreen.cpp
index 26f20326..902aed17 100644
--- a/Minecraft.Client/AchievementScreen.cpp
+++ b/Minecraft.Client/AchievementScreen.cpp
@@ -261,12 +261,10 @@ void AchievementScreen::renderBg(int xm, int ym, float a)
glDepthFunc(GL_LEQUAL);
glDisable(GL_TEXTURE_2D);
-
- AUTO_VAR(itEnd, Achievements::achievements->end());
- for (AUTO_VAR(it, Achievements::achievements->begin()); it != itEnd; it++)
+
+ for ( Achievement *ach : *Achievements::achievements )
{
- Achievement *ach = *it; //Achievements::achievements->at(i);
- if (ach->requires == NULL) continue;
+ if ( ach == nullptr || ach->requires == nullptr) continue;
int x1 = ach->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll + 11 + xBigMap;
int y1 = ach->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll + 11 + yBigMap;
@@ -298,12 +296,9 @@ void AchievementScreen::renderBg(int xm, int ym, float a)
glDisable(GL_LIGHTING);
glEnable(GL_RESCALE_NORMAL);
glEnable(GL_COLOR_MATERIAL);
-
- itEnd = Achievements::achievements->end();
- for (AUTO_VAR(it, Achievements::achievements->begin()); it != itEnd; it++)
- {
- Achievement *ach = *it; //Achievements::achievements->at(i);
+ for ( Achievement *ach : *Achievements::achievements )
+ {
int x = ach->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll;
int y = ach->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll;