Follow-up Comment #5, bug #15195 (project freeciv):
This patch looks good as far as it goes, but it introduces an inconsistency;
if the "busy" unit is also exhausted, instead of generating a Goto order to
be executed next turn, an error message of the form "handle_unit_orders()
invalid Cannon (1213) activity 15 (should be 0)" is generated.
Attached updated patches which apply a similar strategy to
handle_unit_orders(); both movement and new orders now implicitly cancel any
activity on the server.
There are rather more ways of calling send_packet_unit_orders(), but I
audited them and couldn't see an obvious downside to implicitly cancelling
any current activity.
One thing I did wonder: on packet receipt, there are various sanity checks to
deal with skew between client and server and throw away packets that made no
sense; I wondered if changing from discarding to implicit cancellation might
cause trouble in this sort of scenario; however, I don't yet understand the
network side well enough to check this further. I did go back through svn and
found no evidence that the "ACTIVITY_IDLE != punit->activity" check was added
due to a specific problem that had been encountered in the past.
(file #7851, file #7852)
Additional Item Attachment:
File name: S2_1_clear_unit_orders_on_move_3.diff Size:1 KB
File name: trunk_S2_2_clear_unit_orders_on_move_3.diff Size:1 KB
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list