[Freeciv-Dev] (PR#2641) islands from the client's point of view
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#2641) islands from the client's point of view |
From: |
"Mike Kaufman via RT" <rt@xxxxxxxxxxxxxx> |
Date: |
Mon, 23 Dec 2002 18:16:47 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
here is a patch to make the server define a continent from a client's point
of view. This requires that we add a continent field to the player_tile and
call map_get_continent and map_set_continent with a player parameter. This
causes a slight complication in that these two functions have been moved
out of common/ into both client/ and server/
The behavior of map_[set|get]_continent in the server is that
ptile->continent is referenced if the function is called with pplayer==NULL
otherwise plrtile->continent is referenced. The client always references
ptile->continent and ignores the value of pplayer.
On a side note, I've moved the map functions in climisc.c into a new
climap.c (which I'd wanted to do for a while). With the addition of the
continent functions, it seemed reasonable. I've also reworked the continent
updaters in the client to follow the server's way of doing things. This
means that now continents are numbered sequentially with no gaps. This does
add a bit of overhead when two different continents are found to be the
same continent, as it is possible that a third continent will have to be
renumbered to fill in the gap left by the second... read
recycle_continent_num() for more details. The advantages would be that it
would be cleaner for agents, for example, to do calculations on continents.
I consider this ready to go into CVS. My own testing hasn't revealed any
problems if the default ruleset is used. There might be some problems if
buildings are given Island equiv_range since there are some problems with
update_island_impr_effect and renumber_island_impr_effect; however, both of
these will be difficult to fix and somewhat pointless as they are reworked
anyway under the general effects patch. This does change AI behavior.
A note to Per: I left the
This patch is mandatory for work to continue on general effects. Without
this there will be problems with island-ranged effects that I believe
simply cannot be resolved otherwise.
A concern has been voiced about the possible exploitation of this patch
with a trade routes. This is quite doable, given an educated guess about
the behavior of the map generator; however, it is not a win-win situation.
If setting up the trade route extra care must be taken to avoid finding out
that your two very close cities are actually on the same continent. This
generally means that the two cities do _not_ have access to all of their
city squares. This makes the trade route (with doubled trade) a break-even
scenario at best.
Besides the problems with general effects, the current situation can lead
to exploitation since you get information you shouldn't have, namely the
fact that a city is most certainly on another continent even if you
wouldn't ordinarily be privy to this information.
-mike
island1.diff.gz
Description: island1.diff.gz
- [Freeciv-Dev] (PR#2641) islands from the client's point of view,
Mike Kaufman via RT <=
|
|