Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] [PATCH] Unit movement
Home

[Freeciv-Dev] [PATCH] Unit movement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [PATCH] Unit movement
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Jan 2001 01:32:21 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxxxx

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."

Attachment: send_goto.diff
Description: Text document

Attachment: unit_move_result.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]