Skip to content

Commit

Permalink
Execute order before activity
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
psampathkumar committed Jul 16, 2022
1 parent 0aa66f0 commit b6b443d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/srv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b6b443d

Please sign in to comment.