Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2000:
[Freeciv-Dev] Re: transform to/from ocean bug (patch)
Home

[Freeciv-Dev] Re: transform to/from ocean bug (patch)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: transform to/from ocean bug (patch)
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Thu, 25 May 2000 21:03:40 -0400

At 2000/05/15 19:37 , Thue Janus Kristensen wrote:
>The bug was that when transforming land units would be left at sea with
>no transport.
>This patch moves land units in the sea to adjacent land tiles and
>transports on land to the sea. If there is no suitable terrain near we
>disband them. Should be applied on top of my unit move cleanup.

Though I'm not really happy about this as a solution to the problem, it
does circumvent a bug in the server, so let's do it (it can always be
removed later...).  Here's an updated patch which does:

- Again, mining and irrigation can cause land<->ocean changes, so I
included them.

- Since check_terrain_land_ocean_change() must already determine exactly
what has changed, I use a return value from it to figure out what to do
about "stranded" units.

- When the game moves a player's unit, it should notify the player.  So, I
added notifications.  Also, in these messages (and in freelog messages) you
should use unit_name() rather than get_unit_name() -- the latter adds A/D/M
numbers which are inappropriate in these contexts.

- When a land unit is stranded on ocean, it should be able to move onto a
boat for rescue.  Added this.

- When a sea unit is stranded on land, it should be able to move into a
city for rescue.  Added this.

- When a transporter unit moves from a stranded location, it should take
its contents.  Added this.

Attachment: change-to-ocean-moves-units-1.diff.gz
Description: Binary data

jjm

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