Bug #1654 » 0010-Protocol-Make-tech_upkeep-a-32-bit-value.patch
client/packhand.c | ||
---|---|---|
pplayer->economic.tax = pinfo->tax;
|
||
pplayer->economic.science = pinfo->science;
|
||
pplayer->economic.luxury = pinfo->luxury;
|
||
pplayer->client.tech_upkeep = pinfo->tech_upkeep;
|
||
if (has_capability("tu32", client.conn.capability)) {
|
||
pplayer->client.tech_upkeep = pinfo->tech_upkeep_32;
|
||
} else {
|
||
pplayer->client.tech_upkeep = pinfo->tech_upkeep_16;
|
||
}
|
||
gov_change = (!new_player && pgov != pplayer->government
|
||
&& pplayer->government != NULL);
|
||
pplayer->government = pgov;
|
common/networking/packets.def | ||
---|---|---|
PERCENT tax, science,luxury;
|
||
UINT32 infrapoints;
|
||
UINT16 tech_upkeep;
|
||
UINT16 tech_upkeep_16; remove-cap(tu32)
|
||
UINT32 tech_upkeep_32; add-cap(tu32)
|
||
UINT16 science_cost;
|
||
BOOL is_connected;
|
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-3.2-network ownernull16 unignoresync"
|
||
NETWORK_CAPSTRING="+Freeciv-3.2-network ownernull16 unignoresync tu32"
|
||
# If you are distributing freeciv, and apply any patches at all,
|
||
# patch also this field to contain your identification.
|
server/plrhand.c | ||
---|---|---|
if (info_level >= INFO_EMBASSY
|
||
|| (receiver
|
||
&& player_diplstate_get(plr, receiver)->type == DS_TEAM)) {
|
||
packet->tech_upkeep = player_tech_upkeep(plr);
|
||
packet->tech_upkeep_32 = player_tech_upkeep(plr);
|
||
} else {
|
||
packet->tech_upkeep = 0;
|
||
packet->tech_upkeep_32 = 0;
|
||
}
|
||
packet->tech_upkeep_16 = packet->tech_upkeep_32;
|
||
/* Send most civ info about the player only to players who have an
|
||
* embassy. */
|