From d76ccb84672ec2b4cca263aa31ba2bbda86616ee Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 8 Jun 2023 21:02:49 +0300 Subject: [PATCH 25/25] Require actions.ruleset from 3.2 rulesets Only load actions from game.ruleset in compat mode, from 3.1 rulesets. See osdn #48154 Signed-off-by: Marko Lindqvist --- server/ruleset.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/server/ruleset.c b/server/ruleset.c index 17d0ed4e39..80da8ae40f 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -9493,17 +9493,11 @@ static bool load_rulesetdir(const char *rsdir, bool compat_mode, } if (ok) { - /* Can only happen here because 3.1 rulesets may not have a - * actions.ruleset. Remember to move it with the others in 3.3. */ - if (compat_info.version < RSFORMAT_3_2) { + /* 3.1 rulesets have no actions.ruleset. */ + if (compat_info.compat_mode && compat_info.version < RSFORMAT_3_2) { ok = load_ruleset_actions(gamefile, gamefile, &compat_info); } else { - if (secfile_section_prefix_present(actionfile, ACTION_ENABLER_SECTION_PREFIX)) { - ok = load_ruleset_actions(actionfile, gamefile, &compat_info); - } else { - /* Actions not moved to actions.ruleset, or there's none */ - ok = load_ruleset_actions(gamefile, gamefile, &compat_info); - } + ok = load_ruleset_actions(actionfile, gamefile, &compat_info); } } -- 2.39.2