Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix map sharing #2055

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Fix map sharing #2055

merged 1 commit into from
Nov 27, 2023

Commits on Nov 23, 2023

  1. Fix map sharing

    Sharing maps between players was fundamentally broken. The server records the
    last turn in which a player saw a tile. This information is only updated when
    the player stops seeing a tile, and not when it just keeps seeing it because
    the tile is within its vision range.
    
    The following map sharing bugs existed:
    * Tiles seen by the giving player were not sent if the receiving player had
      last viewed them after the giving player;
    * Cities were only updated when destroyed. Renamed or growing cities were not
      updated.
    
    This commit fixes both bugs. The core logic in
    really_give_tile_info_from_player_to_player was completely overhauled to make
    it easier to follow and more correct. In addition, player_tile.site was turned
    to a unique_ptr to facilitate bookkeeping.
    lmoureaux committed Nov 23, 2023
    Configuration menu
    Copy the full SHA
    dbaff85 View commit details
    Browse the repository at this point in the history