From 630cbdca353a709db5dbaf7435894a8fdb214d18 Mon Sep 17 00:00:00 2001 From: mattsc Date: Thu, 8 Jul 2021 19:18:45 -0700 Subject: [PATCH] Fix custom synced commands not changing the AI game state The old ai.synced_command function always set the AI-context game state to changed when executing such a command. This was inadvertently omitted when the implementation was changed to invoke_synced_command in fef953a4. While custom synced commands may or may not change the game state and the engine has no means of determining this correctly in all cases (meaning that neither behavior is technically wrong), the fact that the behavior was changed should be considered a bug. This commit changes it back to how it was before fef953a4. --- src/game_events/action_wml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game_events/action_wml.cpp b/src/game_events/action_wml.cpp index 64343228c3e..8979d22fb87 100644 --- a/src/game_events/action_wml.cpp +++ b/src/game_events/action_wml.cpp @@ -338,6 +338,7 @@ WML_HANDLER_FUNCTION(do_command,, cfg) /*show*/ true, /*error_handler*/ &on_replay_error ); + ai::manager::get_singleton().raise_gamestate_changed(); } }