Follow-up Comment #4, patch #3829 (project freeciv):
Err, rather, the code is just confusing: suggestions for comments to avoid
confusing future readers welcome.
Rulesets add compatible roads to the integrates vector.
Adds road being loaded to the (server-side) integrators list
Adds any road in the integrates INI vector to the (server-side)
Sets a bitvector to match the INI vector for integrates
packets.def: sends the integrates bitvector
Adds road being processed to the (client-side) integrators list
Adds any roads in the integrates bitvector to the (client-side)
Iterates over the integrators list when checking roads.
So, for both client and server, every road always integrates with itself,
regardless of the notation in the ruleset. Further, the identical road is
always first in the integrators list, so that continuation on the same road is
checked first when calculating move cost (which is expected to be the most
common case, and for fast roads, the lowest cost (important as movement over
fast roads requires the greatest number of calls to tile_move_cost_ptrs).
Therefore, the originally submitted patch should be fine to process (unless
something else is discovered in testing). That said, perhaps "integrates" and
"integrators" need greater differentiation to reduce confusion, or, as noted
above, perhaps the code needs more comments.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list