From b6b443da40b9cf0dcd838178a45c7769eae134d4 Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 16 Feb 2022 14:18:50 +0000 Subject: [PATCH] Execute order before activity This is a test to check if there is a way for units to goto and finish an activity in a single turn. Currently seems to work for sequential stuff, like "connect with roads" commands. But when given a simple "goto and do something" the unit stays still for a turn and does both in the next turn. Thereby still taking 2 turns. --- server/srv_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/srv_main.cpp b/server/srv_main.cpp index 57870cc38d..085f28926e 100644 --- a/server/srv_main.cpp +++ b/server/srv_main.cpp @@ -1251,15 +1251,15 @@ void begin_phase(bool is_new_phase) whole_map_iterate_end; phase_players_iterate(pplayer) { - update_unit_activities(pplayer); + execute_unit_orders(pplayer); flush_packets(); } phase_players_iterate_end; - /* Execute orders after activities have been completed (roads built, + /* Execute orders before activities have been completed (roads built, * pillage done, etc.). */ phase_players_iterate(pplayer) { - execute_unit_orders(pplayer); + update_unit_activities(pplayer); flush_packets(); } phase_players_iterate_end;