You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (HUD_config.rp_dist < 0 || HUD_config.rp_dist >= RR_MAX_RANGES) {
983
-
Warning(LOCATION, "Campaign file has invalid radar range %d, setting to default.\n", HUD_config.rp_dist);
984
+
ReleaseWarning(LOCATION, "Campaign file has invalid radar range %d, setting to default.\n", HUD_config.rp_dist);
984
985
HUD_config.rp_dist = RR_INFINITY;
986
+
strikes++;
985
987
}
986
988
987
989
// basic colors
988
990
HUD_config.main_color = cfread_int(cfp);
989
-
HUD_color_alpha = cfread_int(cfp);
991
+
if (HUD_config.main_color < 0 || HUD_config.main_color >= HUD_COLOR_SIZE) {
992
+
ReleaseWarning(LOCATION, "Campaign file has invalid main color selection %i, setting to default.\n", HUD_config.main_color);
993
+
HUD_config.main_color = HUD_COLOR_GREEN;
994
+
strikes++;
995
+
}
990
996
991
-
if (HUD_color_alpha < HUD_COLOR_ALPHA_USER_MIN) {
997
+
HUD_color_alpha = cfread_int(cfp);
998
+
if (HUD_color_alpha < HUD_COLOR_ALPHA_USER_MIN || HUD_color_alpha > HUD_COLOR_ALPHA_USER_MAX) {
999
+
ReleaseWarning(LOCATION, "Campaign file has invalid alpha color %i, setting to default.\n", HUD_color_alpha);
992
1000
HUD_color_alpha = HUD_COLOR_ALPHA_DEFAULT;
1001
+
strikes++;
1002
+
}
1003
+
1004
+
if (strikes == 3) {
1005
+
ReleaseWarning(LOCATION, "Campaign file has too many hud config errors, and is likely corrupted. Please verify and save your settings in the hud config menu.");
if (HUD_color_alpha < HUD_COLOR_ALPHA_USER_MIN || HUD_color_alpha > HUD_COLOR_ALPHA_USER_MAX) {
204
+
ReleaseWarning(LOCATION, "Player file has invalid alpha color %i, setting to default.\n", HUD_color_alpha);
196
205
HUD_color_alpha = HUD_COLOR_ALPHA_DEFAULT;
206
+
strikes++;
207
+
}
208
+
209
+
if (strikes == 3) {
210
+
ReleaseWarning(LOCATION, "Player file has too many hud config errors, and is likely corrupted. Please verify and save your settings in the hud config menu.");
0 commit comments