From 92fc1f122a61346326265de36552ee45ead7160b Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 25 Mar 2021 00:08:22 +0200 Subject: [PATCH 39/39] Drop "Partial_Invis" compat mode handling The flag was not part of 3.1 ruleset format, so we don't support it even in compat mode. See osdn #41854 Signed-off-by: Marko Lindqvist --- server/ruleset.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/server/ruleset.c b/server/ruleset.c index db1cd49df5..5f3fc12516 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -2447,26 +2447,21 @@ static bool load_ruleset_units(struct section_file *file, if (0 == strcmp(sval, "")) { continue; } - if (compat->compat_mode && !fc_strcasecmp("Partial_Invis", sval)) { - u->vlayer = V_INVIS; - } else { - ival = unit_type_flag_id_by_name(sval, fc_strcasecmp); - if (!unit_type_flag_id_is_valid(ival)) { - ok = FALSE; - ival = unit_class_flag_id_by_name(sval, fc_strcasecmp); - if (unit_class_flag_id_is_valid(ival)) { - ruleset_error(LOG_ERROR, "\"%s\" unit_type \"%s\": unit_class flag!", - filename, utype_rule_name(u)); - } else { - ruleset_error(LOG_ERROR, - "\"%s\" unit_type \"%s\": bad flag name \"%s\".", - filename, utype_rule_name(u), sval); - } - break; + ival = unit_type_flag_id_by_name(sval, fc_strcasecmp); + if (!unit_type_flag_id_is_valid(ival)) { + ok = FALSE; + ival = unit_class_flag_id_by_name(sval, fc_strcasecmp); + if (unit_class_flag_id_is_valid(ival)) { + ruleset_error(LOG_ERROR, "\"%s\" unit_type \"%s\": unit_class flag!", + filename, utype_rule_name(u)); } else { - BV_SET(u->flags, ival); + ruleset_error(LOG_ERROR, + "\"%s\" unit_type \"%s\": bad flag name \"%s\".", + filename, utype_rule_name(u), sval); } - fc_assert(utype_has_flag(u, ival)); + break; + } else { + BV_SET(u->flags, ival); } } free(slist); -- 2.30.2