Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #851869 ยป 0018-Send-infra-placing-finishing-turn-to-client.patch

Marko Lindqvist, 2020-04-18 08:28 AM

View differences:

client/packhand.c
if (ptile->placing != NULL) {
tile_changed = TRUE;
ptile->placing = NULL;
ptile->infra_turns = 0;
}
} else {
struct extra_type *old = ptile->placing;
ptile->placing = extra_by_number(packet->placing);
if (ptile->placing != old) {
if (ptile->placing != old
|| ptile->infra_turns != packet->place_turn - game.info.turn) {
tile_changed = TRUE;
}
ptile->infra_turns = packet->place_turn - game.info.turn;
}
if (NULL == tile_worked(ptile)
common/networking/packets.def
RESOURCE resource;
BV_EXTRAS extras;
EXTRA placing;
TURN place_turn; # Send finishing turn and not a counter that would change every turn
STRING spec_sprite[MAX_LEN_NAME];
STRING label[MAX_LEN_MAP_LABEL];
end
fc_version
# - No new mandatory capabilities can be added to the release branch; doing
# so would break network capability of supposedly "compatible" releases.
#
NETWORK_CAPSTRING="+Freeciv.Devel-3.1-2020.Apr.18"
NETWORK_CAPSTRING="+Freeciv.Devel-3.1-2020.Apr.18b"
FREECIV_DISTRIBUTOR=""
server/maphand.c
info.placing = (NULL != ptile->placing)
? extra_number(ptile->placing)
: -1;
info.place_turn = (NULL != ptile->placing)
? game.info.turn + ptile->infra_turns
: 0;
if (pplayer != NULL) {
info.extras = map_get_player_tile(ptile, pplayer)->extras;
......
? extra_number(plrtile->resource)
: MAX_EXTRA_TYPES;
info.placing = -1;
info.place_turn = 0;
info.extras = plrtile->extras;
......
info.terrain = terrain_count();
info.resource = MAX_EXTRA_TYPES;
info.placing = -1;
info.place_turn = 0;
BV_CLR_ALL(info.extras);
    (1-1/1)