|
Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
January 2001: [Freeciv-Dev] [PATCH] Unit movement |
|
[Freeciv-Dev] [PATCH] Unit movement[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
The first patch does some cleanup. It reduces code duplication about unit gotos.
The other introduces a feedback mechanism. Currently there is no easy
way on the client side to get the result of an operation carried out
by the server. One way to address this problem is to send an
information request after the command request and compare the received
information with the current. Another way is to duplicate a lot of
conditions which are checked on the server in the client. Yet another
way is to request an result code from the server. This is the way
which is implemented in the patch. Currently only the movement of a
unit is covered (after working on it I think it must the most complex
process). The unit move request got two additional fields: dry_run and
report_result. dry_run will only test almost all conditions and will
not do the final changes. report_result sends in every case (success
or failure) a result packet back to the client. With these flags code
on the client side can test movement in a predictable way.
Currently the result codes are a bit unsorted. It may be better to
organize them hierarchical. The reporting of the result code can be
merged with text messages. I remember a discussion about client side
message generation. What was the result?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"If at first you don't succeed... well so much for skydiving."
|