[Freeciv-Dev] [Patch] packet_short_city tile_trade
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Problem1: you have captured an enemy city (A) with has a trade route
to another enemy city (B). To calculate the final trade of A we need
the extra trade of the traderoute. To calculate this we need the
tile_trade field of B. However since this is an enemy city we only get
certain information (packet_short_city) about this city. The
tile_trade wasn't included in this.
Problem2: (this is untested since I don't have a savegame for this)
The fix for problem1 will only send data if the player has a dumb city
entry:
From server/citytools.c:send_city_info_at_tile
} else { /* not seen; send old info */
pdcity = map_get_player_tile(x, y, pviewer)->city;
if (pdcity) {
package_dumb_city(pviewer, x, y, &sc_pack);
lsend_packet_short_city(dest, &sc_pack);
}
}
It may happen that a city is captured (A) which has a traderoute with
another city (B) and the player has no dumb entry for B. To solve this
update_dumb_city is called in transfer_city.
Does this makes sense?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
A life? Cool! Where can I download one?
short_city_tile_trade1.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] [Patch] packet_short_city tile_trade,
Raimar Falke <=
|
|